I have been in and out of jRuby over the past couple of years and I got
around to installing jRuby 1.7.16 on my IBM i (Power 6) box. It is
running Java 6 using the J9 JDK. Installation went fine, smoother than
usual.
But when I tried to run rails commands. I got a series of Errno::ENOENT
on various files. The first was a ENOENT on
‘/home/PETE/.gem/jruby/1.9’. I found a post that indicated adding that
path would fix the issue as a workaround (and it did). When I ran
rails new /Path_to_App it seemed like the failures were due to an
environment issue because it was looking for rails in /home/pete/bin,
/usr/bin, /usr/local/bin although none of those folders were on the path
(and I couldn’t figure out why it would look for rails there anyway).
My jruby/bin folder was on the path so I was mystified as to why it
looked elsewhere for rails. Again, a work around was to copy rails
where it seemed to be looking (for whatever reason).
Here is what I see when I try to run rails:
rails new /RailsApps/NewDemo
Errno::ENOENT: ENOENT - /home/pete/bin/rails
file? at org/jruby/RubyFileTest.java:131
find_executable at
/usr/local/jruby-1.7.16/lib/ruby/gems/shared/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:58
find at org/jruby/RubyEnumerable.java:592
find_executable at
/usr/local/jruby-1.7.16/lib/ruby/gems/shared/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:58
exec_app_rails at
/usr/local/jruby-1.7.16/lib/ruby/gems/shared/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:33
loop at org/jruby/RubyKernel.java:1501
exec_app_rails at
/usr/local/jruby-1.7.16/lib/ruby/gems/shared/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:32
(root) at
/usr/local/jruby-1.7.16/lib/ruby/gems/shared/gems/railties-4.1.6/lib/rails/cli.rb:5
require at org/jruby/RubyKernel.java:1065
(root) at
/usr/local/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at
/usr/local/jruby-1.7.16/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
load at org/jruby/RubyKernel.java:1081
(root) at /usr/local/jruby-1.7.16/bin/rails:23
Rather than just keep chasing these issues, perhaps someone can suggest
what the root cause of the problem is. I can’t seem to find anything
that points to a specific configuration step I missed. Any help would
be appreciated.
–
Pete H.
www.petesworkshop.com
GIAC Secure Software Programmer-Java