Ruby on Rails - Ruby 新手帮助 rake db :migrate

标签 ruby ruby-on-rails-3

我是 Ruby on Rails 的新用户,我遇到了一个问题:rake db:migrate

捆绑安装后,出现以下内容:

$ bundle install    
Using rake (0.9.2)    
Using abstract (1.0.0)     
Using activesupport (3.0.9)     
Using builder (2.1.2)  
Using i18n (0.5.0)  
Using activemodel (3.0.9)  
Using erubis (2.6.6)  
Using rack (1.2.3) 
Using rack-mount (0.6.14)  
Using rack-test (0.5.7)  
Using tzinfo (0.3.29)  
Using actionpack (3.0.9)  
Using mime-types (1.16)  
Using polyglot (0.3.2)  
Using treetop (1.4.10)  
Using mail (2.2.19)  
Using actionmailer (3.0.9)  
Using arel (2.0.10)  
Using activerecord (3.0.9)  
Using activeresource (3.0.9)  
Using bundler (1.0.18)  
Using rdoc (3.9.4)  
Using thor (0.14.6)  
Using railties (3.0.9)  
Using rails (3.0.9)  
Using sqlite3-ruby (1.2.5)  
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. 

然后,当我尝试 rake db:migrate 时,我得到以下信息:

$ rake db:migrate 
Could not find polyglot-0.3.2 in any of the sources 
Run `bundle install` to install missing gems.

有人有什么建议吗?谢谢。

我使用的是 ruby​​ 1.8.7 和 rails 3.0.9

最佳答案

检查它的安装位置:

gem list -d polyglot

运行 bundle exec 以确保 rake 使用您的 gemfile 中指定的内容:

bundle exec rake db:migrate

关于Ruby on Rails - Ruby 新手帮助 rake db :migrate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7222307/

相关文章:

ruby-on-rails - 多对多关系获取的脚手架表

Ruby Selenium Webdriver - 页面重定向(刷新)时需要等待/休眠

ruby - 在 ruby​​ 中创建一个带有模式的二维数组

ruby - apn_on_rails 多个应用程序出错

ruby-on-rails-3 - 在 Ruby on Rails 中,有没有一种方法可以使用 RSpec/Capybara 来检查表中行的顺序以进行 View 测试?

javascript - 触发 Controller 显示 View

ruby-on-rails - 在 rails 4 中设计不显示登录表单

Ruby:Sinatra:Web 服务在 Thin 上不可访问

ruby - 在 Mechanize 中选择表( ruby )

mysql - rails 3 : How to make a join in mysql over 3 tables (with :through in the model)