Reputation: 7657
Passenger 4 claims to have support for jruby. When I change into my jruby project directory, execute rvm use jruby
and proceed to passenger start
it state that the Ruby development headers cannot be found and wants me to install ruby. (passenger 4.0 is working for me on my MRI apps, fwiw)
I am working with rvm 1.20, jruby 1.7 installed under rvm, and the passenger gem, in standalone mode
The documentation for passenger standalone is short, any help is greatly appreciated, thank you.
edit: a little more info, I ran passenger-config --ruby-version
passenger-config was invoked through the following Ruby interpreter:
Command: /home/dimitri/.rvm/wrappers/jruby-1.7.3/ruby
so jruby is being picked up.
Upvotes: 1
Views: 595
Reputation: 607
Although we support running web applications using JRuby in Phusion Passenger 4, Passenger itself at the moment has some incompatibility with JRuby.
Unfortunately because Passenger Standalone always runs using the Ruby that's on the path when you run it, that means it does not at the moment work on JRuby.
The workaround at the moment would be to use the non-standalone version and specify JRuby as the interpreter for your web application in the nginx configuration file.
Someone has e-mailed us that they are working on fixing this, I am not sure what their progress is (I believe removing the check for the ruby dev headers goes a long way in supporting JRuby, but have not tested it yet).
Upvotes: 1
Reputation: 1399
If you have passenger working fine with rvm, then why not just point your .conf file to use the rvm version of it. Now that OP provided more info: 3 things need to be checked.
If this command succeed :passenger-install-nginx-module.
If in passenger standalone, passenger_ruby are set correctly as follows.
To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start # see below link and search this text to get full picture
Set headers as explained in section 6.10.3 of http://www.modrails.com/documentation/Users%20guide%20Nginx.html
Upvotes: 0