Hi folks:
I have Windows XP Pro SP3. I have installed ruby 1.9.2p0 (2010-08-18
[i386-mingw32]). I’m trying to install rails 3 by entering “gem install
rails” on command prompt window (i.e. DOS window). Halfway through
installation I get the following:
ERROR: Error installing rails:
mail requires i18n (~> 0.4.1, runtime)
Can anyone help please?
Mike
I ran:
gem install mail
then
gem install rails
and was able to get past that error.
Then before I could ‘rails new’ a project I had to do the following:
gem uninstall i18n
then choose to i18n 0.5.0 which was my option 2.
This is probably because you have 2 version of the same gem installed.
Do this:
Gem uninstall i18n
Select gem to uninstall
- i18n-0.4.2
- i18n-0.5.0
- All versions
select 2
then install rails
gem install rails --force
this should work
Henrik
Same just happened to me on Ubuntu 10.04 using RVM.
Anyways, my theory at the moment is they just released i18n 0.5.0 and
gem install rails installed 0.5.0 and mail gem requires i18n version
0.4.x.
Here’s the entire painful process of getting it working.
abarringer@Andys-Dev-Box:~$ gem install rails
ERROR: Error installing rails:
mail requires i18n (~> 0.4.1, runtime)
abarringer@Andys-Dev-Box:~$ gem install i18n
Successfully installed i18n-0.5.0
1 gem installed
Installing ri documentation for i18n-0.5.0…
Installing RDoc documentation for i18n-0.5.0…
abarringer@Andys-Dev-Box:~$ gem install rails
ERROR: Error installing rails:
mail requires i18n (~> 0.4.1, runtime)
abarringer@Andys-Dev-Box:~$ gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.4)
builder (2.1.2)
erubis (2.6.6)
i18n (0.5.0)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rake (0.8.7)
treetop (1.4.9)
tzinfo (0.3.23)
abarringer@Andys-Dev-Box:~$ gem install mail
Successfully installed i18n-0.4.2
Successfully installed mail-2.2.10
2 gems installed
Installing ri documentation for i18n-0.4.2…
Installing ri documentation for mail-2.2.10…
Installing RDoc documentation for i18n-0.4.2…
Installing RDoc documentation for mail-2.2.10…
abarringer@Andys-Dev-Box:~$ gem install rails -v 3.0.3
Successfully installed actionmailer-3.0.3
Successfully installed thor-0.14.6
Successfully installed railties-3.0.3
Successfully installed bundler-1.0.7
Successfully installed rails-3.0.3
5 gems installed
Installing ri documentation for actionmailer-3.0.3…
Installing ri documentation for thor-0.14.6…
Installing ri documentation for railties-3.0.3…
Installing ri documentation for bundler-1.0.7…
Installing ri documentation for rails-3.0.3…
Installing RDoc documentation for actionmailer-3.0.3…
Installing RDoc documentation for thor-0.14.6…
Installing RDoc documentation for railties-3.0.3…
Installing RDoc documentation for bundler-1.0.7…
Installing RDoc documentation for rails-3.0.3…
abarringer@Andys-Dev-Box:~$ gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.3)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.4)
builder (2.1.2)
bundler (1.0.7)
erubis (2.6.6)
i18n (0.5.0, 0.4.2)
mail (2.2.10)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.3)
railties (3.0.3)
rake (0.8.7)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.23)
I’m getting the same error using RVM on Mac OS X Snow Leopard. This
error was not happening just last week with the same setup.
*I also uninstalled i18n 0.5.0 leaving i18n 0.4.2 to get everything
working…
Andy
Don’t know if this is useful for you but just fixed that yesterday.
I was upgrading from rails 3.0.0 to 3.0.3 and starting “rails server”
complained about needing i18n 0.4.1 but 0.5.0 being active so I
reinstalled all rubies with rvm, removed all cached gems, reinstalled
rails and removed i18n 0.5.0 to leave only 0.4.1 there and it finally
worked.
Used Debian squeeze 64 bit, rvm, ruby 1.9.2-head, rails 3.0.3
Martin
Andy,
I have the same problem, trouble is i have never ever used command
prompt in my life ,and am wondering how do i select option two to
uninstall?
Sarah,
First, from the command prompt type “gem list” to see everything you
have installed.
Verify the name of the gem you want to uninstall. Then, from the
command prompt, type “gem uninstall i18n” You can substitute the name
of any gem for i18n, but I think you referenced that as your problem
gem. Then it asks you which version you want to uninstall with a
numbered list. Simply type the number of the version you want to
remove.
Hope that helps.
JB
I’ve got a very similar problem.
C:>gem install rails -v 3.0.1
ERROR: Error installing rails:
mail requires i18n (~> 0.5.0, runtime)
Nothing to do with previous installations of ruby/rails/gems. I’ve
even gone to the lengths of creating a new VM and still get the same
problem. I’ve had no end of troubles trying to install ruby today,
something very screwy is going on. I specifically want that version
because its the one that activerecord-sqlserver-adapter gem currently
works with.
If anyone has any ideas it would be most welcome.
Thanks
Ben
The short answer:
My guess: I had installed ruby and rails about two weeks apart. I
believe they were out of synch with each other, hence the problem. I
uninstalled all my ruby gems including rails and reinstalled them one
after the other and they all work now.
The long Answer:
I would like to thank all of you who responded and made sensible
suggestions. I tried almost all of them. Indeed, somehow I ended up with
two versions of i18n gem and by removing the more recent version and
rerunning the command “gem install rails” it did seem to complete the
installation without error. However, nothing would work properly.
Something’s worked yet others things did not. For example when I
generated a new rails project the directory contained only two files and
not the whole subdirectory structure that was supposed to be created.
The solution:
I successfully uninstalled ruby by using control panel’s ADD/REMOVE
option. Yet, my original ruby directory was still there which included
some subdirectory and files. I removed that directory as well. I
reinstalled Ruby and rails again. This time all went smoothly and
nothing went wrong. It seems everything is working now. My guess is that
since my installation of ruby and rails were two weeks apart, ruby gem
and rails gem were out of synch. So by removing my entire ruby related
gems/apps and reinstalling them one right after the other may have done
the trick.
Again thank you all for your help.
Mike
I’ve got a very similar problem.
C:>gem install rails -v 3.0.1
ERROR: Error installing rails:
mail requires i18n (~> 0.5.0, runtime)
Nothing to do with previous installations of ruby/rails/gems. I’ve
even gone to the lengths of creating a new VM and still get the same
problem. I’ve had no end of troubles trying to install ruby today,
something very screwy is going on. I specifically want that version
because its the one that activerecord-sqlserver-adapter gem currently
works with.
If anyone has any ideas it would be most welcome.
Thanks
Ben
I’ve got a very similar problem.
C:>gem install rails -v 3.0.1
ERROR: Error installing rails:
mail requires i18n (~> 0.5.0, runtime)
Nothing to do with previous installations of ruby/rails/gems. I’ve
even gone to the lengths of creating a new VM and still get the same
problem. I’ve had no end of troubles trying to install ruby today,
something very screwy is going on. I specifically want that version
because its the one that activerecord-sqlserver-adapter gem currently
works with.
If anyone has any ideas it would be most welcome.
Thanks
Ben
I got thru this problem. Details is here,
Hope this helps.
Nam,
Thanks very much for pointing me in the right direction. It solved my
problem.