开发者

RoR Rake - database error about a gem

开发者 https://www.devze.com 2023-03-02 00:06 出处:网络
I am trying to create a db in my ror application with this command: rake db:create and I got this error:

I am trying to create a db in my ror application with this command:

rake db:create

and I got this error:

Could not find tzinfo-0.3.26 in any of the sources

But when I did the "gem list" command, it turned out I had a newer version of this gem: tzinfo (0.3.27)

What can I do to sync up my gems to be more compatible? Is this a common problem? FYI I am using RVm to manage my gems.

I did do an rvm install tzinfo-0.3.26 command and got this output

jruby-1.6.1-tzinfo - #fetching 
jruby-1.6.1-tzinfo - #extracting jruby-bin-1.6.1 to /home/开发者_StackOverflow中文版agenadinik/.rvm/src/jruby-1.6.1-tzinfo
mv: cannot move `/home/agenadinik/.rvm/src/jruby-1.6.1-tzinfo' to a subdirectory of itself, `/home/agenadinik/.rvm/src/jruby-1.6.1-tzinfo/jruby-1.6.1-tzinfo'
jruby-1.6.1-tzinfo - #extracted to /home/agenadinik/.rvm/src/jruby-1.6.1-tzinfo
Building Nailgun
jruby-1.6.1-tzinfo - #installing to /home/agenadinik/.rvm/rubies/jruby-1.6.1-tzinfo
ERROR: Cannot switch to 1.6.2 for this interpreter.
jruby-1.6.1-tzinfo - #importing default gemsets (/home/agenadinik/.rvm/gemsets/)
Copying across included gems
Fetching: jruby-launcher-1.0.7-java.gem (100%)
Building native extensions.  This could take a while...
Successfully installed jruby-launcher-1.0.7-java
1 gem installed


rvm install tzinfo-0.3.26

if thats what you typed in and executed. Should try running

rvm gem install --version '=0.3.26' tzinfo

that would install the 0.3.26 version of tzinfo

what you did first tells rvm to install a ruby runtime, not a gem.


My guess would be that you're explicitly requiring 0.3.26 in your application. You could either change the requirement to "~>0.3.26" or install the required version with "gem install tzinfo -v 0.3.26".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号