# Misconfiguration on different machine

**URL:** <https://www.ruby-forum.com/t/misconfiguration-on-different-machine/151468>\
**Category:** Rails\
**Created:** [October 21, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/misconfiguration-on-different-machine/151468 "2008-10-21T22:02:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JHuizingh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@JHuizingh](https://www.ruby-forum.com/u/JHuizingh)\
**Post date:** [October 21, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/misconfiguration-on-different-machine/151468/1 "2008-10-21T22:02:53Z")

</div>

I created and have a rails app running on one machine. It is using  
rails 2.1. I ran:

rake rails:freeze  
and  
rake gems:unpack

on my rails app to put all dependencies into the vendor directory.  
Then I checked it into my repository.

On a different machine, I checked out the repository and tried to run

rake db:schema:load --trace

but I got an error (see at the bottom of this post). I am trying to  
use sqlite3 on both machines. The db directory is owned by the user  
that I’m trying to run as, so it should be able to create the  
production sqlite database that is set in the configs. As far as I  
can tell, sqlite3 and the ruby interface to it are installed correctly  
on the second machine.

By freezing rails and unpacking the gems into the vendor directory, it  
is my understanding that I should be able to move the app between  
machines without worrying about the proper gems being installed. Is  
this correct?

Here is the error I get. Can anybody point me in the right direction  
to get this solved?

Thanks,  
Jonathan

$ rake db:schema:load --trace  
(in /home/websites/insurance)  
\*\* Invoke db:schema:load (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
rake aborted!  
undefined method `collect' for nil:NilClass /usr/lib/ruby/1.8/rubygems/version.rb:237:in`initialize’  
/usr/lib/ruby/1.8/rubygems/version.rb:29:in `new' /usr/lib/ruby/1.8/rubygems/version.rb:29:in`initialize’  
/home/websites/insurance/config/…/vendor/rails/railties/lib/rails/  
gem\_dependency.rb:104:in `new' /home/websites/insurance/config/../vendor/rails/railties/lib/rails/ gem_dependency.rb:104:in`specification’  
/home/websites/insurance/vendor/rails/activesupport/lib/active\_support/  
core\_ext/symbol.rb:11:in ` __send__' /home/websites/insurance/vendor/rails/activesupport/lib/active_support/ core_ext/symbol.rb:11:in`to\_proc’  
/home/websites/insurance/config/…/vendor/rails/railties/lib/rails/  
plugin/locator.rb:81:in `map' /home/websites/insurance/config/../vendor/rails/railties/lib/rails/ plugin/locator.rb:81:in`plugins’  
/home/websites/insurance/config/…/vendor/rails/railties/lib/rails/  
plugin/loader.rb:63:in `locate_plugins' /home/websites/insurance/config/../vendor/rails/railties/lib/rails/ plugin/loader.rb:62:in`map’  
/home/websites/insurance/config/…/vendor/rails/railties/lib/rails/  
plugin/loader.rb:62:in `locate_plugins' /home/websites/insurance/config/../vendor/rails/railties/lib/rails/ plugin/loader.rb:27:in`all\_plugins’  
/home/websites/insurance/config/…/vendor/rails/railties/lib/rails/  
plugin/loader.rb:22:in `plugins' /home/websites/insurance/config/../vendor/rails/railties/lib/rails/ plugin/loader.rb:45:in`add\_plugin\_load\_paths’  
/home/websites/insurance/config/…/vendor/rails/railties/lib/  
initializer.rb:235:in `add_plugin_load_paths' /home/websites/insurance/config/../vendor/rails/railties/lib/ initializer.rb:116:in`process’  
/home/websites/insurance/config/…/vendor/rails/railties/lib/  
initializer.rb:93:in `send' /home/websites/insurance/config/../vendor/rails/railties/lib/ initializer.rb:93:in`run’  
/home/websites/insurance/config/environment.rb:13  
/usr/lib/ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in`require’  
/home/websites/insurance/vendor/rails/activesupport/lib/active\_support/  
dependencies.rb:509:in `require' /home/websites/insurance/vendor/rails/activesupport/lib/active_support/ dependencies.rb:354:in`new\_constants\_in’  
/home/websites/insurance/vendor/rails/activesupport/lib/active\_support/  
dependencies.rb:509:in `require' /home/websites/insurance/vendor/rails/railties/lib/tasks/misc.rake:3 /usr/lib/ruby/1.8/rake.rb:546:in`call’  
/usr/lib/ruby/1.8/rake.rb:546:in `execute' /usr/lib/ruby/1.8/rake.rb:541:in`each’  
/usr/lib/ruby/1.8/rake.rb:541:in `execute' /usr/lib/ruby/1.8/rake.rb:508:in`invoke\_with\_call\_chain’  
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize' /usr/lib/ruby/1.8/rake.rb:501:in`invoke\_with\_call\_chain’  
/usr/lib/ruby/1.8/rake.rb:518:in `invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:1183:in`each’  
/usr/lib/ruby/1.8/rake.rb:1183:in `send' /usr/lib/ruby/1.8/rake.rb:1183:in`each’  
/usr/lib/ruby/1.8/rake.rb:515:in `invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:507:in`invoke\_with\_call\_chain’  
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize' /usr/lib/ruby/1.8/rake.rb:501:in`invoke\_with\_call\_chain’  
/usr/lib/ruby/1.8/rake.rb:494:in `invoke' /usr/lib/ruby/1.8/rake.rb:1931:in`invoke\_task’  
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level' /usr/lib/ruby/1.8/rake.rb:1909:in`each’  
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level' /usr/lib/ruby/1.8/rake.rb:1948:in`standard\_exception\_handling’  
/usr/lib/ruby/1.8/rake.rb:1903:in `top_level' /usr/lib/ruby/1.8/rake.rb:1881:in`run’  
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1878:in`run’  
/usr/bin/rake:28

---

<div class="post-metadata">

**Author:** ![JHuizingh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@JHuizingh](https://www.ruby-forum.com/u/JHuizingh)\
**Post date:** [October 22, 2008, 4:05am UTC](https://www.ruby-forum.com/t/misconfiguration-on-different-machine/151468/2 "2008-10-22T04:05:44Z")

</div>

What gems are you freezing bsesides rails gems?

One common problem with this is that you freeze, say my\_gem-0.3.4, but  
the  
other machine has my\_gem-0.3.5 installed. Rails loads the system gem  
because  
it is newer than the frozen one.

So, try ‘gem list’ and compare frozen gem versions with the ones  
installed.

On Tue, Oct 21, 2008 at 3:01 PM, JHuizingh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> /home/websites/insurance/config/…/vendor/rails/railties/lib/rails/  
> plugin/locator.rb:81:in `plugins' /home/websites/insurance/config/../vendor/rails/railties/lib/rails/ /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in /usr/lib/ruby/1.8/rake.rb:546:in `execute’  
> /usr/lib/ruby/1.8/rake.rb:507:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:1948:in `standard\_exception\_handling’  
> /usr/lib/ruby/1.8/rake.rb:1878:in `run’  
> /usr/bin/rake:28
> 
> >

–  
ANDRES RODRIGUEZ E  
Electronic Engineer  
Software Developer  
IT Consultant

US Phone: (305) 853-8356  
Primary Mobile: +57-300-2006186  
Secondary Mobile: +57-314-7939859

---

<div class="post-metadata">

**Author:** ![JHuizingh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@JHuizingh](https://www.ruby-forum.com/u/JHuizingh)\
**Post date:** [October 22, 2008, 5:20am UTC](https://www.ruby-forum.com/t/misconfiguration-on-different-machine/151468/3 "2008-10-22T05:20:02Z")

</div>

The original machine has  
hpricot-0.6.161  
mechanize-0.8.3  
and 2.1.0 of all the rails related gems.

The new machine does not have hpricot or mechanize. It has rails  
version 2.0.2-1 installed through the ubuntu package manager.

It’s my understanding that if you do the gem freezing step, it  
shouldn’t matter what gems are installed on the machine. Is my  
thinking right or wrong?

---

<div class="post-metadata">

**Author:** ![JHuizingh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@JHuizingh](https://www.ruby-forum.com/u/JHuizingh)\
**Post date:** [October 25, 2008, 12:24am UTC](https://www.ruby-forum.com/t/misconfiguration-on-different-machine/151468/4 "2008-10-25T00:24:34Z")

</div>

I got the problem fixed.

The second machine I was trying to load the application on only had a  
really old version of rails installed through my distro’s package  
manager. I removed that, installed a new version of rails through  
rubygems, and it worked. I guess I don’t understand the point of  
freezing the rails gems if it doesn’t work in that situation, but I  
have it working either way.

Thanks,  
Jonathan

---

<div class="post-metadata">

**Author:** ![JHuizingh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@JHuizingh](https://www.ruby-forum.com/u/JHuizingh)\
**Post date:** [October 24, 2008, 1:29am UTC](https://www.ruby-forum.com/t/misconfiguration-on-different-machine/151468/5 "2008-10-24T01:29:28Z")

</div>

That is only true for rails gems. Other gems may conflict.

Have you resolved the issue?

On Tue, Oct 21, 2008 at 10:19 PM, JHuizingh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> shouldn’t matter what gems are installed on the machine. Is my
> 
> > it is newer than the frozen one.
> > 
> > > this correct?  
> > > \*\* Invoke environment (first\_time)  
> > > /home/websites/insurance/vendor/rails/activesupport/lib/active\_support/  
> > > plugin/loader.rb:62:in `map' /home/websites/insurance/config/../vendor/rails/railties/lib/ dependencies.rb:509:in `require’  
> > > /usr/lib/ruby/1.8/rake.rb:501:in `synchronize' /usr/lib/ruby/1.8/rake.rb:1931:in `invoke\_task’  
> > > –  
> > > ANDRES RODRIGUEZ E  
> > > Electronic Engineer  
> > > Software Developer  
> > > IT Consultant
> > 
> > US Phone: (305) 853-8356  
> > Primary Mobile: +57-300-2006186  
> > Secondary Mobile: +57-314-7939859

–  
ANDRES RODRIGUEZ E  
Electronic Engineer  
Software Developer  
IT Consultant

US Phone: (305) 853-8356  
Primary Mobile: +57-300-2006186  
Secondary Mobile: +57-314-7939859
