1

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.

darethas
  • 7,377
  • 3
  • 23
  • 32

2 Answers2

1

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).

Tinco
  • 597
  • 3
  • 14
  • Correct. Although Phusion Passenger already supported JRuby, *installing* Phusion Passenger with JRuby was not possible. This has been fixed in [commit e95e73e5](https://github.com/FooBarWidget/passenger/commit/e95e73e54edcc957fb0534ccf2752ef9f50fe216), which will be part of Phusion Passenger 4.0.3. – Hongli May 23 '13 at 18:42
0

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

Community
  • 1
  • 1
salah-1
  • 1,299
  • 11
  • 15
  • I don't think I am understanding your reply, are you sure you understand my post? I am very familiar with that blog post. Passenger standalone uses an nginx core, does not use apache. – darethas May 16 '13 at 18:38
  • I think i do. You essentially, switching to jruby & trying to point passenger to your old install without installing it again. Whether you use apache or Nginx, you will need to setup PassengerRoot & PassengerRuby. Did you install the "passenger-install-nginx-module" – salah-1 May 16 '13 at 18:54
  • Well, i see now. I miss important piece :) – salah-1 May 16 '13 at 18:54
  • from passenger standalone: execute this and it should give hints of where it thinks its Ruby interpreter is: ./yourPassenger-Install/passenger-config --root – salah-1 May 16 '13 at 18:56