繁体   English   中英

Rails db:migrate找不到宝石

[英]Rails db:migrate can't find gems

我正在尝试运行rake db:migrate命令,但是当我运行它时,它告诉我没有安装gem。 我将运行bundle install并将其正确执行,但是随后它将再次告诉我未安装gem。 告诉我未安装的gem是minitest-5.8.0

这是我执行bundle install后显示的内容

Using rake 10.4.2
Using ZenTest 4.11.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.1
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.1
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.1
Using globalid 0.3.6
Using activejob 4.2.1
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.1
Using activemodel 4.2.1
Using arel 6.0.3
Using activerecord 4.2.1
Using autotest 4.4.6
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using columnize 0.9.0
Using byebug 5.0.0
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.1
Using coffee-rails 4.1.0
Using diff-lcs 1.2.5
Using tilt 1.4.1
Using haml 4.0.6
Using multi_json 1.11.2
Using jbuilder 2.3.1
Using jquery-rails 4.0.4
Using bundler 1.7.12
Using sprockets 3.2.0
Using sprockets-rails 2.3.2
Using rails 4.2.1
Using rdoc 4.2.0
Using rspec-support 3.3.0
Using rspec-core 3.3.2
Using rspec-expectations 3.3.1
Using rspec-mocks 3.3.2
Using rspec-rails 3.3.3
Using sass 3.4.16
Using sass-rails 5.0.3
Using sdoc 0.4.1
Using spring 1.3.6
Using sqlite3 1.3.10
Using turbolinks 2.5.3
Using uglifier 2.7.1
Using web-console 2.2.1
Your bundle is complete!
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

当我运行which ruby它将向我显示路径/usr/local/bin/ruby ;当我运行bundle show minitest它将向我显示/Library/Ruby/Gems/2.0.0/gems/minitest-5.8.0

为什么未检测到安装了minitest。

尝试使用bundle exec运行rake db:migrate

您完整的运行命令应为bundle exec rake db:migrate

我会尝试重新安装您的红宝石

rvm get stable
rvm reinstall ruby-2.3.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM