Hi, I read a lot of stuff about rvm so I want to use it on my production server, but which installation method should I use? site-wide? Thanks for your advice -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Feb-06 11:31 UTC
Re: Which install method for rvm on production server?
On Feb 6, 11:06 am, Fernando Perez <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, > > I read a lot of stuff about rvm so I want to use it on my production > server, but which installation method should I use? site-wide?I use a system wide deployment ( http://rvm.beginrescueend.com/deployment/best-practices/ ) Fred> > Thanks for your advice > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Nikos Dimitrakopoulos
2011-Feb-06 12:05 UTC
Re: Which install method for rvm on production server?
I was thinking to do the same with an upcoming deployment. Does anyone have experience on this to point out possible downsides? On Sunday, February 6, 2011 1:31:01 PM UTC+2, Frederick Cheung wrote:> > > > On Feb 6, 11:06 am, Fernando Perez <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > Hi, > > > > I read a lot of stuff about rvm so I want to use it on my production > > server, but which installation method should I use? site-wide? > > I use a system wide deployment ( > http://rvm.beginrescueend.com/deployment/best-practices/ > ) > > Fred > > > > Thanks for your advice > > > > -- > > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-06 12:30 UTC
Re: Which install method for rvm on production server?
> I use a system wide deployment ( > http://rvm.beginrescueend.com/deployment/best-practices/ > ) > > FredThank you Fred, I had missed that page. By the way I read that it is suggested to use a different user per application. Therefore, is there a "general rails deployment best practices" somewhere? I might be missing other useful tips. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Feb-06 14:30 UTC
Re: Which install method for rvm on production server?
On Feb 6, 12:30 pm, Fernando Perez <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> > I use a system wide deployment ( > >http://rvm.beginrescueend.com/deployment/best-practices/ > > ) > > > Fred > > Thank you Fred, I had missed that page. > > By the way I read that it is suggested to use a different user per > application. Therefore, is there a "general rails deployment best > practices" somewhere? I might be missing other useful tips. >I tend to only have one application per server, so using a different user per app doesn''t really apply. In principle it does sound like it would reduce the possibility of them interfering with each other, or security issues with one affecting other apps. Don''t know of any general best practises document. Fred> -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-06 17:34 UTC
Re: Which install method for rvm on production server?
On my Leopard dev machine I have installed rvm+1.9.2 and everything seems fine, function, rubygems, environment, etc. But when I want to install my first gem (hint: rails 3) I get the following error message: $ gem install rails ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/fernando/.gem/specs The ~/.gem directory belongs to root and seems to have been created on the day I reinstalled my system, so it probably belongs to the system''s ruby. I see a similar directory ~/.subversion, with same ownership and date of creation, so I assume it was created by Leopard, or was it Macports? Therefore can I safely chown ~/.gem, or should I destroy this directory and let rvm recreate a new one if needed? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-06 17:44 UTC
Re: Which install method for rvm on production server?
Fernando Perez wrote in post #979907:> $ gem install rails > ERROR: While executing gem ... (Errno::EACCES) > Permission denied - /Users/fernando/.gem/specsFrom what I have read here and there, it seems that this directory was chowned to root when I used evil "sudo gem install" I delected the directory, and as expected rvm/rubygems recreated a new one with proper permission. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 14:24 UTC
Re: Which install method for rvm on production server?
>> I read a lot of stuff about rvm so I want to use it on my production >> server, but which installation method should I use? site-wide? > > I use a system wide deployment ( > http://rvm.beginrescueend.com/deployment/best-practices/ > ) > > FredOk, so on my FreeBSD box, the site system wide install script crapped out. No big deal I only need Ruby for my user that runs the application. So I will use the "normal installation". I will use Nginx+Passenger. So I install passenger as non root. Then when I want to install nginx, I should do: $ sudo passenger-install-nginx-module which will install in /opt/nginx. Should I use a non sudo location or stick with sudo for nginx? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 14:32 UTC
Re: Which install method for rvm on production server?
> $ sudo passenger-install-nginx-module > > which will install in /opt/nginx. > > Should I use a non sudo location or stick with sudo for nginx?Argh! With rvm''s normal installation I cannot use sudo. Good, now I''m stuck. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jim Ruther Nill
2011-Feb-13 14:55 UTC
Re: Re: Which install method for rvm on production server?
use rvmsudo. On Sun, Feb 13, 2011 at 10:32 PM, Fernando Perez <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> > $ sudo passenger-install-nginx-module > > > > which will install in /opt/nginx. > > > > Should I use a non sudo location or stick with sudo for nginx? > > Argh! With rvm''s normal installation I cannot use sudo. > > Good, now I''m stuck. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 15:41 UTC
Re: Re: Which install method for rvm on production server?
Jim ruther Nill wrote in post #981401:> use rvmsudo.Thanks! So far so good. Just a last question. I have my own script to remotely update and maintain my apps (I don''t use capistrano and don''t intend to do so). But when I want to remotely run "bundle install" it can''t find it. It''s certainly a PATH, profile, bashrc, etc problem. So can someone show me a good resource that will clear that for me once and for all. I never know the difference between rc/profile, interactive login and what have you. I''d like to get that out of the way because every so often I run into this problem and have to struggle to get things sorted out. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 17:49 UTC
Re: Which install method for rvm on production server?
Hmmm, strange. If I run rake remotely, the rake seems to be found but an error is raised: uninitialized constant Bundler -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 17:58 UTC
Re: Which install method for rvm on production server?
Adding a .rvmrc to the project did not help, neither did "rvm 1.9.2 exec bundle install". -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 18:03 UTC
Re: Which install method for rvm on production server?
Ha! Using ssh and "gem env", I discovered that rvm was not loaded. So it''s definitely a bash_profile VS profile VS etc evil issue. God that''s painful. So when in a script I use: ssh -t blabla ''bundle install'' what kind of shell is created? Which files are loaded? Why can''t I get the same environment as when I manually connect through ssh? This separation interactive/non-interactive is stupid to me, and unnecessarily complicates things. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 18:05 UTC
Re: Which install method for rvm on production server?
> This separation interactive/non-interactive is stupid to me, and > unnecessarily complicates things.Is that related to bash? What if I use a different shell? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 18:10 UTC
Re: Which install method for rvm on production server?
Argh! I have sourced .profile from with .bashrc but it still doesn''t work. It seems that the following line is key and is not being loaded: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 19:07 UTC
Re: Which install method for rvm on production server?
I enabled PermitUserEnvironment for ssh and added GEM_PATH as well as PATH to ~/.ssh/environment, and still it had no effect at all. Frustrating. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Nikos Dimitrakopoulos
2011-Feb-13 19:51 UTC
Re: Re: Which install method for rvm on production server?
this will be handy - thanks for sharing :) On Sun, Feb 13, 2011 at 21:07, Fernando Perez <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I enabled PermitUserEnvironment for ssh and added GEM_PATH as well as > PATH to ~/.ssh/environment, and still it had no effect at all. > Frustrating. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- *I love deadlines. Especially the whooshing sound they make as they pass by. * -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 19:58 UTC
Re: Which install method for rvm on production server?
I found a solution! In the script, do something such as: source ~/.rvm/scripts/rvm && bundle install And it will work. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-Feb-13 20:06 UTC
Re: Which install method for rvm on production server?
All in all, even if I had to endure a bit of trial and error, I really like the way rvm works and keeps things confined. If one day my ruby and/or gems go South I can simply rm -r ~/.rvm and everything goes away so that I can start a fresh install in a breeze. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-May-06 19:34 UTC
Re: Which install method for rvm on production server?
Fernando Perez wrote in post #981446:> All in all, even if I had to endure a bit of trial and error, I really > like the way rvm works and keeps things confined. > > If one day my ruby and/or gems go South I can simply rm -r ~/.rvm and > everything goes away so that I can start a fresh install in a breeze.I''ll have to retract that statement. I updated my gems recently and passenger got updated as well, for some reason my Nginx+passenger setup is now broken. I tried reinstalling Nginx+passenger with rvmsudo but now it has permission problems. Why kind of joke is that? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-May-06 19:41 UTC
Re: Which install method for rvm on production server?
rvm sudo prompts me for my password, so I guess under the hood it''s triggering sudo, so why that it now have the proper permissions over /opt??? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2011-May-06 23:06 UTC
Re: Which install method for rvm on production server?
I had no other choice to change the permissions on /opt/nginx to the group in charge of the webapp stuff. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.