# Replaced Rails Package with HiveLogic Install - problems

**URL:** <https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574>\
**Category:** Rails\
**Created:** [April 4, 2006, 9:38pm UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574 "2006-04-04T21:38:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [April 4, 2006, 9:38pm UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574/1 "2006-04-04T21:38:42Z")

</div>

Hi,

I’ve got a strange problem. I had initially installed Rails using Tony  
Arnold’s package:

[http://www.tonyarnold.com/articles/category/rails](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\_rails\_lighttpd\_mysql\_tiger](http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger)

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

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [April 5, 2006, 1:31am UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574/2 "2006-04-05T01:31:52Z")

</div>

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](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/](http://www.tinker.com/)

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [April 5, 2006, 2:17am UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574/3 "2006-04-05T02:17:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [April 5, 2006, 4:55am UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574/4 "2006-04-05T04:55:57Z")

</div>

On 4/4/06, John T. [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [April 5, 2006, 5:56am UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574/5 "2006-04-05T05:56:26Z")

</div>

#!/usr/bin/env ruby

Same as a new app that works without problems.

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [April 5, 2006, 5:28am UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574/6 "2006-04-05T05:28:48Z")

</div>

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](mailto: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

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [April 5, 2006, 7:51am UTC](https://www.ruby-forum.com/t/replaced-rails-package-with-hivelogic-install-problems/93574/7 "2006-04-05T07:51:36Z")

</div>

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
