Installation ... how to run redmine without webrick ?
Added by Alexandre FRIEDMANN over 12 years ago
Hello,
I have followed the installation instructions, logged as root, from http://www.redmine.org/projects/redmine/wiki/RedmineInstall
with
RHEL5
rvm and ruby 1.9.3p327
Rails 3.2.9
Phusion Passenger version 3.0.18
redmine checkout v 2.1.4
I succeeded to run redmine, with webrick, using ruby script/rails server webrick -e production and to access it from my LAN with
http://192.xxx.xxx.xxx:3000/
I must admit that i do not see exactly how all these ruby/rails/passenger and redmine work together, and i did not manage to run redmine from apache2, which is currently running, providing some other services.
I want redmine to be accessible from a LAN, and to use a 'sub-URI' approach:
- I created a softlink : /var/www/html/redmine -> /opt/redmine/public
- I added the following in my /etc/httpd/conf/httpd.conf :
Listen *:3000 LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.18/ext/apache2/mod_passenger.so PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.18 PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p327/ruby PassengerUserSwitching off PassengerDefaultUser apache <Directory /var/www/html/redmine> RailsBaseURI /redmine PassengerResolveSymlinksInDocumentRoot on Options -MultiViews </Directory>
- Of course, i use service httpd restart every time i modify something.
I am not sure this configuration is sufficient, and i was wondering if adding the passenger_module to the httpd.conf implied that redmine started with apache service, or if redmine had to be launched another way...?
In the logfile (/var/log/httpd/error_log), i found something interesting occuring when restarting httpd service :
[Wed Dec 05 10:33:46 2012] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations /usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:541:in `read': Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p327/specifications/rails-3.2.8.gemspec (Errno::EACCES)
I realize that i have both rails-3.2.8.gemspec and rails-3.2.9.gemspec, and that the one apache (or passenger or rails, or ruby ... :s) is looking for, is actually one with no read permission for apache user.
-rw-r----- 1 root rvm 2069 Dec 4 09:15 rails-3.2.8.gemspec -rw-rw-r-- 1 root rvm 2069 Dec 4 08:59 rails-3.2.9.gemspec
Why is it trying to read rails-3.2.8.gemspec instead of rails-3.2.9.gemspec, since "rails -v" returns me "Rails 3.2.9" ?
I hope there is enough informations here, and i would enjoy any help into this setup process !
Thanks,
Replies (1)
RE: Installation ... how to run redmine without webrick ?
-
Added by Alexandre FRIEDMANN over 12 years ago
Hi all,
- Answer to my first question is yes: loading the modules for passenger and setup the confifuration of httpd.conf is enough to launch everything. I realized that apache launches passenger that lauchs rails that launchs redmine ...
- I have re-set most of my gems from start, and ensured that i only had rails-3.2.8.
- I had to extend permissions in reading/executing for most of these packages in rvm subfolders (passenger error page helped me through this)
- I was getting really confused with the setup of virtual hosts, and i found this blog really helpfull, since it show how to configure apache without virtualhost, only specifying a new "location"
[[http://mattconnolly.wordpress.com/2010/09/19/redmine-ruby-on-rails-without-virtual-hosts/#comment-332]]
Everything seems to work fine,
Hope it will help !