Re: [zones-discuss] mongrel rails in a zone
Matt Harrison <[EMAIL PROTECTED]> writes: > Steve Lawrence wrote: >> On Sun, Jul 13, 2008 at 09:22:07PM +0100, Matt Harrison wrote: >>> Steve Lawrence wrote: My guess is that your zones lack /var/ruby.* >>> Thanks for the reply, >>> >>> My zones in fact do have /var/ruby* and I can list and view the files >>> which it tells me don't exist. >> >> Sometimes truss -f ... gives a good indication of exactly >> what file is not being found, assumming this is a missing file problem. > > Did you install ruby+friends in the global zone using packages, from a tar file, or from source compilation? A package install from the global zone should install the package contents into all zones, properly handling /usr verses /var. >>> My ruby is installed from the OpenSolaris installer when the system was >>> built, the only thing I have manually installed was a handful of gems >>> which I did with the "gem" command. > > >> Which release of opensolaris are you using? Are you sure /usr and /lib >> are read-only, as that is not the usual setup in the recent releases of >> opensolaris? > > I'm running SCXE snv91 and the zone was created with very basic setup. > /usr was definately read-only in the zone according to mount. > >> Perhaps the gem command updates files in /var, which are per zone. You may >> need to add the gems using the gem command in every zone. > > Ok, I've done some digging and played with copying certain files. > Basically /var is separate and doesn't contain my gems, so I tried > copying my gems in, still not found. > > Then I tried copying the source cache across too and that now works. > Just for reference I rsync'd everything between /var/ruby/1.8/gem_home > on the global and the local zones. > >> It would be best to root cause your issue, rather than just attempt to work >> around it via another installation mechanism. Please reply if adding the >> gems to each zone does not resolve the issue. > > This is now sorted, just sync the contents of the above directories > between the host and the zone. You could install the gems into the zone > directly, but that would require a writable /usr as some of the gems > install binaries or scripts there. > > Thanks for the replies, you stimulated something in my mind so I went > back to check things :) Another case where a non-native package-manager-like thing breaks something. ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] mongrel rails in a zone
Steve Lawrence wrote: > On Sun, Jul 13, 2008 at 09:22:07PM +0100, Matt Harrison wrote: >> Steve Lawrence wrote: >>> My guess is that your zones lack /var/ruby.* >> Thanks for the reply, >> >> My zones in fact do have /var/ruby* and I can list and view the files >> which it tells me don't exist. > > Sometimes truss -f ... gives a good indication of exactly > what file is not being found, assumming this is a missing file problem. > >>> Did you install ruby+friends in the global zone using packages, from >>> a tar file, or from source compilation? A package install from the global >>> zone should install the package contents into all zones, properly handling >>> /usr verses /var. >> My ruby is installed from the OpenSolaris installer when the system was >> built, the only thing I have manually installed was a handful of gems >> which I did with the "gem" command. > > Which release of opensolaris are you using? Are you sure /usr and /lib > are read-only, as that is not the usual setup in the recent releases of > opensolaris? I'm running SCXE snv91 and the zone was created with very basic setup. /usr was definately read-only in the zone according to mount. > Perhaps the gem command updates files in /var, which are per zone. You may > need to add the gems using the gem command in every zone. Ok, I've done some digging and played with copying certain files. Basically /var is separate and doesn't contain my gems, so I tried copying my gems in, still not found. Then I tried copying the source cache across too and that now works. Just for reference I rsync'd everything between /var/ruby/1.8/gem_home on the global and the local zones. > It would be best to root cause your issue, rather than just attempt to work > around it via another installation mechanism. Please reply if adding the > gems to each zone does not resolve the issue. This is now sorted, just sync the contents of the above directories between the host and the zone. You could install the gems into the zone directly, but that would require a writable /usr as some of the gems install binaries or scripts there. Thanks for the replies, you stimulated something in my mind so I went back to check things :) Thanks Matt ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] mongrel rails in a zone
On Sun, Jul 13, 2008 at 09:22:07PM +0100, Matt Harrison wrote: > Steve Lawrence wrote: > >My guess is that your zones lack /var/ruby.* > > Thanks for the reply, > > My zones in fact do have /var/ruby* and I can list and view the files > which it tells me don't exist. Sometimes truss -f ... gives a good indication of exactly what file is not being found, assumming this is a missing file problem. > > >Did you install ruby+friends in the global zone using packages, from > >a tar file, or from source compilation? A package install from the global > >zone should install the package contents into all zones, properly handling > >/usr verses /var. > > My ruby is installed from the OpenSolaris installer when the system was > built, the only thing I have manually installed was a handful of gems > which I did with the "gem" command. Which release of opensolaris are you using? Are you sure /usr and /lib are read-only, as that is not the usual setup in the recent releases of opensolaris? Perhaps the gem command updates files in /var, which are per zone. You may need to add the gems using the gem command in every zone. > > >If your means of installation insists on writing to /usr/ruby, they you > >could create a writeable /usr/ruby filesystem (using zonecfg add fs) so > >that you can install ruby into every zone. Adding a lofs filesystem, that > >maps to a directory in the global zone, is straightfoward. > > I could do that, I just thought it was odd that although the files are > there, ruby (or gem) doesn't think they are. This indicates to me that > whatever metadata ruby uses to manage the gem collection isn't being > copied to the zones. Same comment as above. > > So basically I'm either going to wait for someone to help track down the > ruby-zones-gems problem, or I can install ruby, rubygems and my gems > from source for each zone? It would be best to root cause your issue, rather than just attempt to work around it via another installation mechanism. Please reply if adding the gems to each zone does not resolve the issue. -Steve L. > > > Thanks > > > Matt ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] mongrel rails in a zone
Steve Lawrence wrote: > My guess is that your zones lack /var/ruby.* Thanks for the reply, My zones in fact do have /var/ruby* and I can list and view the files which it tells me don't exist. > Did you install ruby+friends in the global zone using packages, from > a tar file, or from source compilation? A package install from the global > zone should install the package contents into all zones, properly handling > /usr verses /var. My ruby is installed from the OpenSolaris installer when the system was built, the only thing I have manually installed was a handful of gems which I did with the "gem" command. > If your means of installation insists on writing to /usr/ruby, they you > could create a writeable /usr/ruby filesystem (using zonecfg add fs) so > that you can install ruby into every zone. Adding a lofs filesystem, that > maps to a directory in the global zone, is straightfoward. I could do that, I just thought it was odd that although the files are there, ruby (or gem) doesn't think they are. This indicates to me that whatever metadata ruby uses to manage the gem collection isn't being copied to the zones. So basically I'm either going to wait for someone to help track down the ruby-zones-gems problem, or I can install ruby, rubygems and my gems from source for each zone? Thanks Matt ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] mongrel rails in a zone
My guess is that your zones lack /var/ruby.* Did you install ruby+friends in the global zone using packages, from a tar file, or from source compilation? A package install from the global zone should install the package contents into all zones, properly handling /usr verses /var. If your means of installation insists on writing to /usr/ruby, they you could create a writeable /usr/ruby filesystem (using zonecfg add fs) so that you can install ruby into every zone. Adding a lofs filesystem, that maps to a directory in the global zone, is straightfoward. -Steve L. On Sat, Jul 12, 2008 at 08:10:24PM +0100, Matt Harrison wrote: > Hello, > > I've got an opensolaris box running several websites from mongrel > clusters, and I'd like to have each site's cluster running in an > isolated zone. > > I've been through the administrative guides and FAQs pertaining to zones > and managed to get a zone created and running without problems. > > The problem I'm having is that although the zone is sharing /usr and > /var, the zone cannot use any of the ruby gems that I have installed. > > For example I've installed mongrel, rails, capistrano and all > dependencies into the global zone and they work perfectly. > > Unfortunately when I try to use these gems from within the non-global > zone I get "gem not found errors" like so: > > $ mongrel_rails cluster::start > /usr/ruby/1.8/lib/ruby/site_ruby/1.8/rubygems.rb:304:in > `report_activate_error': Could not find RubyGem mongrel (> 0) > (Gem::LoadError) > [] > > Of course I can't re-install the gems from the zone as /usr and /var are > not writable from there. > > Does anyone have any experience with running ruby gems from zones and > might be able to give me some guidance with this? > > > Many Thanks > > Matt > ___ > zones-discuss mailing list > zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
[zones-discuss] mongrel rails in a zone
Hello, I've got an opensolaris box running several websites from mongrel clusters, and I'd like to have each site's cluster running in an isolated zone. I've been through the administrative guides and FAQs pertaining to zones and managed to get a zone created and running without problems. The problem I'm having is that although the zone is sharing /usr and /var, the zone cannot use any of the ruby gems that I have installed. For example I've installed mongrel, rails, capistrano and all dependencies into the global zone and they work perfectly. Unfortunately when I try to use these gems from within the non-global zone I get "gem not found errors" like so: $ mongrel_rails cluster::start /usr/ruby/1.8/lib/ruby/site_ruby/1.8/rubygems.rb:304:in `report_activate_error': Could not find RubyGem mongrel (> 0) (Gem::LoadError) [] Of course I can't re-install the gems from the zone as /usr and /var are not writable from there. Does anyone have any experience with running ruby gems from zones and might be able to give me some guidance with this? Many Thanks Matt ___ zones-discuss mailing list zones-discuss@opensolaris.org