# Problem with gem install and rails update

**URL:** <https://www.ruby-forum.com/t/problem-with-gem-install-and-rails-update/178374>\
**Category:** Rails\
**Created:** [November 3, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/problem-with-gem-install-and-rails-update/178374 "2009-11-03T18:17:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixel75](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de053/32.png) [@pixel75](https://www.ruby-forum.com/u/pixel75)\
**Post date:** [November 3, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/problem-with-gem-install-and-rails-update/178374/1 "2009-11-03T18:17:56Z")

</div>

Hi everyone.  
I’m new to Rails and have been trying to learn something listening to  
Ryan B.’ podcast.  
I have tried to install the authlogic gem, inserting the extension as  
a dependency in the environment.rb file as requested.  
But, when I run ‘sudo rake gems:install’ I get an error: wrong number  
of arguments.

I’ve pasted the trace blow.

Then thinking that Rails version could be out of time, I changed  
Rails’ version from 2.2.2 to 2.3, and repeated the same command having  
the same result. It seems as it’s executing the code still from the  
older version of Rails, as you can see below.  
I’ve checked my file system. Rails 2.3.4 is installed, but 2.2.2 is  
still there. I should delete it or change some Path assignation ?

Another thing: I’m running Rails on Ubuntu 8.04, and have it installed  
in the filesystem (/usr/lib/ruby/gems/1.8/gems) and in the home  
directory as hidden file (/home/dario/.gem/ruby/1.8/gems). Is it like  
it should be or it has to be only in one directory ?  
Thank you in advance for your help.

Dario

Here is the trace for the “wrong number of arguments” error::

dario@dario-laptop:~/Aptana\_Studio/sito$ sudo rake gems:install –  
trace  
(in /home/dario/Aptana\_Studio/sito)  
\*\* Invoke gems:install (first\_time)  
\*\* Invoke gems:base (first\_time)  
\*\* Execute gems:base  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
rake aborted!  
wrong number of arguments (2 for 1)  
/home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb:  
92:in `add' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/locator.rb: 92:in`plugins’  
/home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:  
63:in `locate_plugins' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb: 62:in`map’  
/home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:  
62:in `locate_plugins' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb: 27:in`all\_plugins’  
/home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:  
22:in `plugins' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb: 45:in`add\_plugin\_load\_paths’  
/home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/initializer.rb:269:in  
`add_plugin_load_paths' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/initializer.rb:135:in`process’  
/home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in  
`send' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in`run’  
/home/dario/Aptana\_Studio/sito/config/environment.rb:13  
/usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in`require’  
/home/dario/.gem/ruby/1.8/gems/activesupport-2.2.2/lib/active\_support/  
dependencies.rb:153:in `require' /home/dario/.gem/ruby/1.8/gems/activesupport-2.2.2/lib/active_support/ dependencies.rb:521:in`new\_constants\_in’  
/home/dario/.gem/ruby/1.8/gems/activesupport-2.2.2/lib/active\_support/  
dependencies.rb:153:in `require' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/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:494:in `invoke' /home/dario/.gem/ruby/1.8/gems/rails-2.2.2/lib/tasks/gems.rake:21 /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:** ![pixel75](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de053/32.png) [@pixel75](https://www.ruby-forum.com/u/pixel75)\
**Post date:** [November 3, 2009, 9:07pm UTC](https://www.ruby-forum.com/t/problem-with-gem-install-and-rails-update/178374/2 "2009-11-03T21:07:48Z")

</div>

On Nov 3, 9:58 am, Dario P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Then thinking that Rails version could be out of time, I changed  
> Rails’ version from 2.2.2 to 2.3, and repeated the same command having  
> the same result. It seems as it’s executing the code still from the  
> older version of Rails, as you can see below.  
> I’ve checked my file system. Rails 2.3.4 is installed, but 2.2.2 is  
> still there. I should delete it or change some Path assignation ?

If you generated the application under 2.2.2, there’s probably a  
RAILS\_GEM\_VERSION set in your environment.rb; try changing that to  
2.3.4.

> Another thing: I’m running Rails on Ubuntu 8.04, and have it installed  
> in the filesystem (/usr/lib/ruby/gems/1.8/gems) and in the home  
> directory as hidden file (/home/dario/.gem/ruby/1.8/gems). Is it like  
> it should be or it has to be only in one directory ?  
> Thank you in advance for your help.

It shouldn’t cause any problems to have it in both places (AFAIK), but  
it certainly doesn’t need to be in both.

–Matt J.

---

<div class="post-metadata">

**Author:** ![pixel75](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de053/32.png) [@pixel75](https://www.ruby-forum.com/u/pixel75)\
**Post date:** [November 4, 2009, 8:50pm UTC](https://www.ruby-forum.com/t/problem-with-gem-install-and-rails-update/178374/3 "2009-11-04T20:50:21Z")

</div>

It was indeed the rails version to mess with the application.  
Modifying the RAILS\_GEM\_VERSION things got back to normal.  
Thank you for your help. Very much appreciated.

Dario P.
