문제

Has anyone had any success with installing Rails 3.2 and JRuby 1.6.5 on Mac OSX Lion using RVM? I'm planning on using TorqueBox with NGINX on my production server and I'm trying to mimic as much of the development technology onto my development machine as possible. I haven't gotten to install TorqueBox on my production server, and so far with my OSX RVM install I'm getting a few errors from an existing Rails 3.2 app that works fine with 1.9.2 and REE.

The problem that I'm experiencing is this:

ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make: * [GEM.bundle] Error 1

Where GEM is any of the handful of Gems that fail when installed with JRuby (1.6.5).

Basically what I'm asking is that if I were to not use JRuby on my dev machine and stick to just 1.9.2 and then use JRuby only on the production machine then is this really a problem? Or should I continue trying to get it to work on Lion?

--- EDIT ---

So far this works with 1.6.6, but Rails 3.2 seems to hang when first accessed after it is booted up. No errors in the console. Any ideas?

도움이 되었습니까?

해결책

The problem you are describing with -rpath is http://bugs.jruby.org/6199. This is fixed in JRuby 1.6.6.

C extensions are not particularly recommended for use with JRuby in production. They work for the most part (some still fail), but they can be quite slow. Please consult https://github.com/jruby/jruby/wiki/C-Extension-Alternatives and use jruby-lint to see if you can get rid as much of your C extensions as possible.

My personal recommendation is to get your development machine as close to the production machine as reasonably possible, but don't sweat the details. You need to be productive on your development machine, but you don't want a false sense of invincibility when the production Ruby runtime is completely different from the one on your development machine.

다른 팁

Charles Nutter tweeted about that JRuby 1.6.6 is required for Rails 3.2.

I could upgrade my project to Rails 3.2 after upgrading JRuby

JRuby 1.6.6 and later does not work on Solaris. http://jira.codehaus.org/browse/JRUBY-6494

Currently then, Rails 3.2 is not supported by JRuby on Solaris.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top