huoxito has quit [Remote host closed the connection]
seanlinsley has quit [Quit: seanlinsley]
phragg has joined #rubygems
kai3x5 has joined #rubygems
<phragg>
I'm using the passenger gem to hook rails with nginx, however I'm getting an issue where Passenger can't deploy because it can't find my bundler gem. I'm wondering if this is because my gem path is incorrect? Can anyone help me out?
havenwood has quit []
<phragg>
The gem -v says 2.4.1 but the passenger debug + ruby conf says it's RubyGems paths = ["/var/lib/gems/1.8", "/.gem/ruby/1.8"]
<phragg>
and 1.8 is the only dir under /var/lib/gems
davispuh has quit [Ping timeout: 245 seconds]
<tmoore>
phragg: that 1.8 would correspond with the Ruby version. Is that the version of Ruby you're intending to use?
<phragg>
tmoore, i'm using ruby 2.0
<tmoore>
OK then it sounds like Passenger is picking up the wrong version of Ruby
<tmoore>
How have you installed Ruby?
<phragg>
i'm on a mediatemple dedicated server, it was already installed but if anything probably via apt-get
<tmoore>
Do you have passenger_ruby set in your nginx.conf?
<phragg>
yes
<phragg>
set to /usr/bin/ruby
<tmoore>
Does `/usr/bin/ruby -v` show 2.0?
<phragg>
no, 1.8.7 :p
<tmoore>
There's your problem :-)
<phragg>
i see.
<phragg>
alright, well it must be that rvm is conflicting with it
<tmoore>
If you're using rvm, then that's probably how Ruby was installed
<tmoore>
you probably need to point passenger/nginx to the absolute location of the right ruby executable
<phragg>
well i'm thinking rvm was somehow installed afterwards cause when i rvm list it doesn't show anything
<phragg>
also, I've tried the rvm integration but when it asks for my source code of nginx i realized i used apt-get for that so it would have binaries not source..
<tmoore>
What does `which ruby` output from your shell?
<phragg>
`/root/.rbenv/shims/ruby'
<tmoore>
Heh so that sounds like you're using rbenv to manage the Ruby version :-)
<phragg>
D: guess so.
huoxito has joined #rubygems
<phragg>
is there anyway I can just use rvm instead?
<tmoore>
What does `rbenv which ruby` return?
<phragg>
well-- i jumped the gun, did rvm install 2.1.1, rvm use 2.1.1, ruby -v and it says 2.1.1
<tmoore>
OK sure
<phragg>
/usr/bin/ruby -v still reads as 1.8.7
<tmoore>
Yeah, you'll need to set passenger_ruby in your config
<tmoore>
The normal RVM instruction should hopefully work for you now
<phragg>
so what should I set my path to then? Cause rvm use 2.1.1 says Using /usr/local/rvm/gems/ruby-2.1.1 but that's just the dir
huoxito has quit [Ping timeout: 250 seconds]
<phragg>
ah but which ruby tells me /usr/local/rvm/rubies/ruby-2.1.1/bin/ruby
<phragg>
welp it apparently isn't allowed to set passenger_ruby to rvm
<phragg>
"You've set the `PassengerRuby` (Apache) or `passenger_ruby` (Nginx) option to '/usr/local/rvm/rubies/ruby-2.1.1/bin/ruby'. However, because you are using RVM, this is not allowed: the option must point to an RVM wrapper script, not a raw Ruby binary. This is because RVM is implemented through various environment variables, which are set through the wrapper script."
<phragg>
set it to /usr/local/rvm/wrappers/ruby-2.1.1/ruby and now it's throwing an error that i need to run bundle install (which i thought i had).
<phragg>
all good i suppose, just getting a 502..
<phragg>
tmoore, i apprecitate your assistance and patience
alindeman has quit [Quit: /quit]
<tmoore>
Sorry phragg got a Skype call
<phragg>
no worries, you helped me to as far as needed really.
<tmoore>
You might need to re run bundle because you're working with a new Ruby version
<tmoore>
gems are typically installed to a directory that depends on the current version of Ruby, so switching versions requires reinstalling
<tmoore>
cool :-) best of luck getting it all working
<phragg>
i ran bundle install and that's when the nginx 502 bad error came