I'm just trying to get Hello World working before moving on to other
things. I have deleted the public/index.html (which displays fine with
Apache) and done the following:
script/generate controller home index
edit config/routes.rb and add the line map.root :controller => "home"
above the default routes
Pretty simple.... so I got the Passenger error at first because root
owned config/environment.rb so it is now owned by www-data.
I hope this is something simple with the Apache config I'm simply
missing. I presume since the error shows up at all that my Passenger
config is at least correct in part.
first in httpd.conf file, after:
LoadModule passenger_module /opt/ruby-enterprise/lib/ruby/gems/
1.8/gems/passenger-2.1.2/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/
passenger-2.1.2
PassengerRuby /opt/ruby-enterprise/bin/ruby
RailsSpawnMethod conservative #This I wrote it, just because the
user guide says that is necesary to do it, when works well in mongrel
not in Passenger.
Next inside apache2/conf/extra/httpd_vhosts.conf
<VirtualHost *:80>
ServerName www.sitename.com.mx #Domain name to
public
DocumentRoot "/usr/local/apache2/htdocs/sitename/public" #the
place where where app is in filesystem --erase this comment because
apache give an error.
RailsEnv development #Say to
pasenger that our app is in development.
</VirtualHost>
It could be necesary check the path to ruby binary files ...
Just have to say thank you for this post.
I have Ubuntu 12.04 LTS and have been trying to learn ruby on rails and
this has been something I am stuck on now for 2 days. RAILS_ENV
helped, but did not solve it for me yet.