Docs for using different rvm-mediated gemsets in one installation?

12 views
Skip to first unread message

Eric Promislow

unread,
Apr 1, 2013, 1:33:20 AM4/1/13
to phusion-...@googlegroups.com
Hi, I've installed 4.0.0.rc4 and it's working fine, but I'm looking for
any docs on how to run different apps with different gemsets.
Everything's running Ruby  1.9.2p320 and Rails 3.2.12, but
I've run into some weird problems involving conflicting gem
versions, and was hoping I could sandbox each of my apps.

Can it be done?

If so, do I put a .rvmrc file in each RAILS_ROOT dir?

Thanks,
Eric

Hongli Lai

unread,
Apr 1, 2013, 5:37:35 AM4/1/13
to phusion-passenger
If you want to sandbox your gems you really should use Bundler. It's designed for that and works much better than RVM gem sets.

That said, if you still want to use RVM gem sets, then you're supposed to put the gemset name in the 'passenger_ruby' option for your app. When using RVM your Ruby command contains a substring like '@global'. Replace '@global' with '@your-gemset-name'.




--
You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phusion-passen...@googlegroups.com.
To post to this group, send email to phusion-...@googlegroups.com.
Visit this group at http://groups.google.com/group/phusion-passenger?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Eric Promislow

unread,
Apr 1, 2013, 1:01:12 PM4/1/13
to phusion-...@googlegroups.com
Thanks for the reply. I am using bundler, but I've run into an unexplained
version conflict while upgrading ActiveAdmin from 0.4.0 to 0.5.0 (it no
longer picks up the ActiveAdmin locale file, even though the
I18n.load_path points to it).  Rather than further duct-taping my
libraries I'm tempted to zap this ruby and reinstall via rvm.

I'm hosting two different apps on my server, both running
rails 3.1.10 on ruby 1.9.2p320, out of /usr/local/bin 

I am using bundler, but there's nothing in my nginx.conf file
that references it.  Should there be?

My sense is that I've been tempting fate by not using rvm to
manage the apps.  I'll try the @ notation as seen in
https://groups.google.com/forum/?hl=en-US&fromgroups=#!searchin/phusion-passenger/rvm/phusion-passenger/gvZCQzRs7Xg/YNdFL9HtWwAJ

- Eric

Hongli Lai

unread,
Apr 1, 2013, 2:07:27 PM4/1/13
to phusion-passenger
On Mon, Apr 1, 2013 at 7:01 PM, Eric Promislow <eric.pr...@gmail.com> wrote:
Thanks for the reply. I am using bundler, but I've run into an unexplained
version conflict while upgrading ActiveAdmin from 0.4.0 to 0.5.0 (it no
longer picks up the ActiveAdmin locale file, even though the
I18n.load_path points to it).  Rather than further duct-taping my
libraries I'm tempted to zap this ruby and reinstall via rvm.

I'm hosting two different apps on my server, both running
rails 3.1.10 on ruby 1.9.2p320, out of /usr/local/bin 

I am using bundler, but there's nothing in my nginx.conf file
that references it.  Should there be?

There shouldn't be. When using Bundler, what matters is your Gemfile and Gemfile.lock. As a user, you only edit Gemfile to specify your dependencies. Bundler locks down specific versions of your gems by writing that information to Gemfile.lock. Phusion Passenger automatically activates all gems in Gemfile.lock whenever it detects that file.
Reply all
Reply to author
Forward
0 new messages