Forum: Ruby on Rails Replaced Rails Package with HiveLogic Install - problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John T. (Guest)
on 2006-04-04 23:38
(Received via mailing list)
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
Kim S. (Guest)
on 2006-04-05 03:31
(Received via mailing list)
On Apr 4, 2006, at 1:36 PM, John T. 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 S. - principal, Shrier and Deihl - 
mailto:removed_email_address@domain.invalid
Remote Unix Network Admin, Security, Internet Software Development
   Tinker Internet Services - Superior FreeBSD-based Web Hosting
                      http://www.tinker.com/
John T. (Guest)
on 2006-04-05 04:17
(Received via mailing list)
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.
John T. (Guest)
on 2006-04-05 06:55
(Received via mailing list)
On 4/4/06, John T. <removed_email_address@domain.invalid> 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
Brad D. (Guest)
on 2006-04-05 07:28
What's the shebang line (first line of dispatch.fcgi) say? It may be
pointing at the old ruby...

John T. wrote:
> On 4/4/06, John T. <removed_email_address@domain.invalid> 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
John T. (Guest)
on 2006-04-05 07:56
(Received via mailing list)
#!/usr/bin/env ruby

Same as a new app that works without problems.
John T. (Guest)
on 2006-04-05 09:51
(Received via mailing list)
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
This topic is locked and can not be replied to.