RT @bruno_cats: Concordo 100% RT @jurandirfilho: O vídeo mostrando a história do PSX na conferência do PS4 foi melhor que toda apresentação… 4 hours ago
RT @YgorFremo: Call of Duty Free o jogo em que você compra coisas no aeroporto sem taxa alfandegária 4 hours ago
Setting up your Ruby on Rails application in an Ubuntu Jaunty Jackalope (9.04) server with Nginx, MySQL, Ruby Enterprise Edition and Phusion Passenger
11 Responses to “Setting up your Ruby on Rails application in an Ubuntu Jaunty Jackalope (9.04) server with Nginx, MySQL, Ruby Enterprise Edition and Phusion Passenger”
Nice to see that you’re moving from mongrels, I can’t imagine myself setting up another server without Passenger.
Now to your question, the paths needs to be updated because many gems have an executable script that will be placed at the REE “/bin” folder and if you don’t update the path to add the “/opt/ruby-enterprise/bin” directory you won’t be able to call them directly.
Examples of this are rake, autotest, spec and even mongrel_rails :)
So you need to update your PATH with the REE bin directory to be able to call these scripts without using the full path.
This is a great tutorial and everything seems to be working very well except for one issue. I don’t know how this will affect an application but I have never seen it before.
Once I have nginx running if I try to visit the ip of the server it shows the ruby on rails welcome aboard page. When I click on the About your application’s environment i receive the following error:
“Cannot spawn application ‘/home/john/Sites/blog’: Could not write ‘spawn_application’ command to the spawn server: Broken pipe (32)”
June 9, 2009 at 5:33 pm
Thanks mate! I’m going to give nginx+passenger a try and have done with all the mongrel processes.
Just one question – why bother updating the path if you’re just going to symlink the executables into /usr/bin anyway?
June 9, 2009 at 5:41 pm
Hi Irving,
Nice to see that you’re moving from mongrels, I can’t imagine myself setting up another server without Passenger.
Now to your question, the paths needs to be updated because many gems have an executable script that will be placed at the REE “/bin” folder and if you don’t update the path to add the “/opt/ruby-enterprise/bin” directory you won’t be able to call them directly.
Examples of this are rake, autotest, spec and even mongrel_rails :)
So you need to update your PATH with the REE bin directory to be able to call these scripts without using the full path.
June 11, 2009 at 12:26 am
[...] Setting up your Ruby on Rails application in an Ubuntu Jaunty Jackalope (9.04) server with Nginx, My… — 11:25am via [...]
June 11, 2009 at 11:55 am
You might want to symlink rake too, I had some problems without that.
June 11, 2009 at 12:02 pm
Also do gem sources -a http://gems.github.com so that you can install gems from Github. I think mislav-will_paginate comes from there.
July 14, 2009 at 7:53 pm
I found i need to add a rake to my my ls links
ln -s /opt/ruby-enterprise/bin/rake /usr/bin/rake
and add thiss to my path to get gem executables working
export PATH=$PATH:/home/username/.gem/ruby/1.8/bin
August 5, 2009 at 7:31 pm
This is a great tutorial and everything seems to be working very well except for one issue. I don’t know how this will affect an application but I have never seen it before.
Once I have nginx running if I try to visit the ip of the server it shows the ruby on rails welcome aboard page. When I click on the About your application’s environment i receive the following error:
“Cannot spawn application ‘/home/john/Sites/blog’: Could not write ‘spawn_application’ command to the spawn server: Broken pipe (32)”
Any suggestions? Thanks much!
August 24, 2009 at 2:03 pm
Hey John,
I think that maybe this is too late, but you should definitely check out the phusion-passenger discussion list, I’ve never seen this issue -> http://groups.google.com/group/phusion-passenger
September 8, 2009 at 12:25 pm
I have followed this tutorial for a staging server. I also get Broken pipe error.
September 8, 2009 at 12:38 pm
Update: only true for Rails 2.3.3 +. Checked error.log
November 25, 2009 at 12:01 pm
[...] Setting up your Ruby on Rails application in an Ubuntu Jaunty Jackalope (9.04) server with Nginx, My… (tags: ubuntu rubyonrails) [...]