Problem with gem install and rails update

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:inplugins’
/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:inmap’
/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:inall_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:inadd_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:inprocess’
/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:inrun’
/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:inrequire’
/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:innew_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:incall’
/usr/lib/ruby/1.8/rake.rb:546:in execute' /usr/lib/ruby/1.8/rake.rb:541:ineach’
/usr/lib/ruby/1.8/rake.rb:541:in execute' /usr/lib/ruby/1.8/rake.rb:508:ininvoke_with_call_chain’
/usr/lib/ruby/1.8/rake.rb:501:in synchronize' /usr/lib/ruby/1.8/rake.rb:501:ininvoke_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:incall’
/usr/lib/ruby/1.8/rake.rb:546:in execute' /usr/lib/ruby/1.8/rake.rb:541:ineach’
/usr/lib/ruby/1.8/rake.rb:541:in execute' /usr/lib/ruby/1.8/rake.rb:508:ininvoke_with_call_chain’
/usr/lib/ruby/1.8/rake.rb:501:in synchronize' /usr/lib/ruby/1.8/rake.rb:501:ininvoke_with_call_chain’
/usr/lib/ruby/1.8/rake.rb:518:in invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:1183:ineach’
/usr/lib/ruby/1.8/rake.rb:1183:in send' /usr/lib/ruby/1.8/rake.rb:1183:ineach’
/usr/lib/ruby/1.8/rake.rb:515:in invoke_prerequisites' /usr/lib/ruby/1.8/rake.rb:507:ininvoke_with_call_chain’
/usr/lib/ruby/1.8/rake.rb:501:in synchronize' /usr/lib/ruby/1.8/rake.rb:501:ininvoke_with_call_chain’
/usr/lib/ruby/1.8/rake.rb:494:in invoke' /usr/lib/ruby/1.8/rake.rb:1931:ininvoke_task’
/usr/lib/ruby/1.8/rake.rb:1909:in top_level' /usr/lib/ruby/1.8/rake.rb:1909:ineach’
/usr/lib/ruby/1.8/rake.rb:1909:in top_level' /usr/lib/ruby/1.8/rake.rb:1948:instandard_exception_handling’
/usr/lib/ruby/1.8/rake.rb:1903:in top_level' /usr/lib/ruby/1.8/rake.rb:1881:inrun’
/usr/lib/ruby/1.8/rake.rb:1948:in standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1878:inrun’
/usr/bin/rake:28

On Nov 3, 9:58 am, Dario P. [email protected] 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.

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.