Re: [jruby-user] Missing files (or seemingly so)
Pete Helgren <[email protected]> Mon, 27 Oct 2014 08:01:44 -0500
| Newsgroups | gmane.comp.lang.jruby.user |
|---|---|
| Message-ID | <[email protected]> |
Tim, I'll check that out. This is on an IBM i which is a bit different from any other mainline OS. Anything that executes java is A-OK because the J9 JVM that IBM has is rock solid on this platform but if we are talking about any executable binaries, then things get interesting. Most of what I run I run in an environment called PASE which is an AIX-like shell that can execute most binaries that can run in AIX. Sometimes I have to compile to run in PASE (PPC64) so it will vary based on what the binary does. Because of those unknowns, sticking with a "pure" java install: Unzip, set path and classpath, and go, is the way I deploy most applications in the java world. But, I'll give it a whirl.... Pete Helgren www.petesworkshop.com GIAC Secure Software Programmer-Java On 10/27/2014 5:45 AM, Tim Uckun wrote: > How exactly did you install jruby. > > I recommend you use rvm, rbenv, or chruby. > > Clearly something went wrong with your installation and your > environment got screwed up. I have used jruby complete before with > some scripts and some environment manipulation before but that's kind > of an involved process and you are much better off using one of the > above mentioned projects. > > > > On Mon, Oct 27, 2014 at 4:08 PM, Pete Helgren <[email protected] > <mailto:[email protected]>> wrote: > > Nothing like that. I still think there is something messed up in > the path or home folder. Can't quite figure out what is out of > place. There IS a ruby installation as well and I am trying to > figure out if that is what is causing the issue. Neither install > is working at the moment (ruby or jruby). > > Thanks for trying! > > Pete > > > On 10/24/2014 11:15 PM, Keith Bennett wrote: >> Pete - >> >> I'm not sure...the "shared" in the directory name makes it sound >> like there could be more than one directory. And I suspect you >> should go one directory up, because gems is the name of one of >> several subdirectories GEM_HOME should have. >> >> When I do a directory of my GEM_HOME I get this: >> >> ➜ ~GEM_HOME ls >> bin cache environment gems wrappers >> build_info doc extensions specifications >> >> Is that something like the directory you mentioned? >> >> One way I figure out where it is is to install a random gem (e.g. >> my "trick_bag" gem) that I don't yet have (check with "gem >> list"), and see if it was installed in that directory >> >> - Keith >> >> >> On Sat, Oct 25, 2014 at 10:12 AM, Pete Helgren <[email protected] >> <mailto:[email protected]>> wrote: >> >> Thanks Keith... >> >> Where should the GEM_HOME environment variable point? I have >> a boatload of gems in >> /usr/local/jruby-1.7.16/lib/ruby/gems/shared/gems. Is that >> where it should point? >> >> Pete >> >> >> On 10/24/2014 10:05 AM, Keith Bennett wrote: >>> Pete - >>> >>> Since the rails command is part of a gem (the Rails gem), >>> wouldn't it be in the gem bin directory? (I use rvm and it >>> handles path stuff automatically for me.) >>> >>> >>> Where are your gems being installed? You should probably >>> have a GEM_HOME environment variable pointing to the root of >>> your gem directory tree. There should be a bin subdirectory >>> there somewhere, and that needs to be in your PATH >>> environment variable AFAIK. >>> >>> - Keith >>> >>> On Thu, Oct 23, 2014 at 7:44 PM, Pete Helgren >>> <[email protected] <mailto:[email protected]>> wrote: >>> >>> 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 Helgren >>> www.petesworkshop.com <http://www.petesworkshop.com> >>> GIAC Secure Software Programmer-Java >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> > >