Hi, I've got a strange problem. I had initially installed Rails using Tony Arnold's package: <http://www.tonyarnold.com/articles/category/rails> and that worked fine. (on OS X, obviously). I then decided to reinstall using the instructions on the HiveLogic page, to get Ruby 1.8.4: <http://hivelogic.com/articles/2005/12/01/ruby_rail... That seemed to go well - I had everything installed. The one thing I did, since Tony included a bunch of gems with his package, was to copy the gems to the new /usr/local/lib directory: /usr/lib/ruby/gems/1.8/* -> /usr/local/lib/ruby/gems I'm able to create a new rails app and run it with script/server and lighttpd starts up. However. I was playing with a Rails app - Tracks - and tried to run it, but it would not start up. I found that I had to remove the lighttpd.conf file and let it be recreated. I then noticed that it was being copied from my /usr/lib/ruby/gems... directory... not the /usr/local/lib directory. So.. I tried removing all the gems from /usr/lib.... (my path is set correctly to use /usr/local/bin first). Now.. when I try to start the server, I'm getting an error: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__': No such file to load -- initializer (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from ./script/../config/boot.rb:14 from script/server:2:in `require' from script/server:2 But ONLY in the existing Tracks app folder. Starting from a new rails app folder correctly runs (and will copy the lighttpd.conf file from the /usr/local/lib... directory.) Somewhere in the old tracks app folder it's still referring to the (now non-existant) /usr/lib/ruby/... stuff... and I can't find it! Does anyone have some insight? Please? Thanks! jt
on 2006-04-04 21:38
on 2006-04-05 01:31
On Apr 4, 2006, at 1:36 PM, John Tsombakos wrote: > > lighttpd starts up. > Now.. when I try to start the server, I'm getting an error: > But ONLY in the existing Tracks app folder. Starting from a new rails > > jt Just off the top of my head, it looks like you are running the version of ruby that comes with MACOSX that is in /usr/bin. Type "which ruby" in a terminal window to find out the path to your ruby interpreter. If you installed a 1.8.4 ruby in /usr/local/bin, you need to make sure that one is run by removing or renaming the one in /usr/bin, or by modifying your search path to look in /usr/local/bin before looking in /usr/bin, or specifying the absolute path to your ruby executable. Hope that helps. Kim -- Kim Shrier - principal, Shrier and Deihl - mailto:firstname.lastname@example.org Remote Unix Network Admin, Security, Internet Software Development Tinker Internet Services - Superior FreeBSD-based Web Hosting http://www.tinker.com/
on 2006-04-05 02:17
I do have /usr/local/bin in my path statement. Creating a new Rails app will use the ruby that is in /usr/local/bin. For some reason, when I try to do anything with the "tracks" Rails app (which I had used successfully prior to my "HiveLogic" install), the system insists on using /usr/bin/ruby. Doing 'which ruby' in the Tracks folder does show /usr/local/bin/ruby. I thought there may be some configuration setting somewhere that is overriding what is set in the PATH, but doing a search of the whole project comes up empty. I was just playing around with that app, so not a huge deal if I can't get it working. I'll just trash it - I was just wondering how borked my system is... Thanks, though.
on 2006-04-05 04:55
On 4/4/06, John Tsombakos <email@example.com> wrote: > I do have /usr/local/bin in my path statement. > > Creating a new Rails app will use the ruby that is in /usr/local/bin. > anyone have any idea why an existing app would want to use /usr/bin/ruby and look for files in /usr/lib/ruby/site_ruby/1.8/rubygems and not in /usr/local/lib ? thanks
on 2006-04-05 05:28
What's the shebang line (first line of dispatch.fcgi) say? It may be pointing at the old ruby... John Tsombakos wrote: > On 4/4/06, John Tsombakos <firstname.lastname@example.org> wrote: >> I do have /usr/local/bin in my path statement. >> >> Creating a new Rails app will use the ruby that is in /usr/local/bin. >> > > anyone have any idea why an existing app would want to use > /usr/bin/ruby and look for files in > /usr/lib/ruby/site_ruby/1.8/rubygems and not in /usr/local/lib ? > > thanks
on 2006-04-05 05:56
#!/usr/bin/env ruby Same as a new app that works without problems.
on 2006-04-05 07:51
Duh. My bad. I checked the files in the script/ directory (script/server, script/console, etc.) and most of them began with #!/usr/bin/ruby... Replaced them with #!/usr/bin/env ruby and all seems well now. Thanks again. jt