Forum: Ruby on Rails Error installing rails 3, get error: mail requires i18n (~> 0.4.1, runtime)

81ab54aa3875b7551f8d58571cb72ca3?d=identicon&s=25 Mike Moretti (mike8765)
on 2010-11-29 18:54
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
F2d0f274a46256860860ea39c1c1f92f?d=identicon&s=25 Joseph R. (joseph_r)
on 2010-11-29 20:07
I ran:

gem install mail

then

gem install rails

and was able to get past that error.
F2d0f274a46256860860ea39c1c1f92f?d=identicon&s=25 Joseph R. (joseph_r)
on 2010-11-29 21:06
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.
Bc6f00973fd0dec39b3710f25d6fcc32?d=identicon&s=25 HENRI (Guest)
on 2010-11-29 22:14
(Received via mailing list)
This is probably because you have 2 version of the same gem installed.

Do this:

Gem uninstall i18n

Select gem to uninstall
1. i18n-0.4.2
2. i18n-0.5.0
3. All versions

select 2

then install rails
gem install rails --force

this should work


Henrik
6f1eee762eb3d48c5a005a2a37d51ca1?d=identicon&s=25 Jonathan (Guest)
on 2010-11-29 22:14
(Received via mailing list)
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.
21da295fbb295b08c4f5e25526c44eea?d=identicon&s=25 Andy (Guest)
on 2010-11-29 23:21
(Received via mailing list)
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)
21da295fbb295b08c4f5e25526c44eea?d=identicon&s=25 Andy (Guest)
on 2010-11-30 00:07
(Received via mailing list)
*I also uninstalled i18n 0.5.0 leaving i18n 0.4.2 to get everything
working...

Andy
48cd02b3f39a2e72dc766da91e89353b?d=identicon&s=25 Sarah Dunne (neven)
on 2010-11-30 00:17
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?
019bed180232c174bb2fd7c7cc72d2b5?d=identicon&s=25 Gogov (Guest)
on 2010-11-30 10:52
(Received via mailing list)
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
6ef20d52926e737e5ad5628a3efbfddf?d=identicon&s=25 John (Guest)
on 2010-11-30 22:11
(Received via mailing list)
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
81ab54aa3875b7551f8d58571cb72ca3?d=identicon&s=25 Mike Moretti (mike8765)
on 2010-12-01 21:16
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
86613a0ac83d5f992564380fef947dad?d=identicon&s=25 Ben Perry (Guest)
on 2010-12-02 20:13
(Received via mailing list)
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
86613a0ac83d5f992564380fef947dad?d=identicon&s=25 Ben Perry (Guest)
on 2010-12-02 20:18
(Received via mailing list)
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
86613a0ac83d5f992564380fef947dad?d=identicon&s=25 Ben Perry (Guest)
on 2010-12-02 20:27
(Received via mailing list)
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
47bacc856f7a2b3c90c48d6f84ef21f4?d=identicon&s=25 Nam H. (nam_h)
on 2010-12-04 10:31
I got thru this problem. Details is here,
http://hotrannam.wordpress.com/2010/12/04/rails3-g...

Hope this helps.
86613a0ac83d5f992564380fef947dad?d=identicon&s=25 Ben Perry (Guest)
on 2010-12-04 15:49
(Received via mailing list)
Nam,

Thanks very much for pointing me in the right direction. It solved my
problem.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.