[英]require': cannot load such file -- mysql2/mysql2 (LoadError) rails 4
[英]LoadError: cannot load such file — mysql2/mysql2 - on rake db:create
當我運行rake db:create
,出現以下錯誤:
LoadError: cannot load such file -- mysql2/mysql2
/Users/vitorqueiroz/dev/pipeline/config/application.rb:10:in `<top (required)>'
/Users/vitorqueiroz/dev/pipeline/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
我必須手動安裝mysql2 gem,因為gemfile指定了版本“ 0.3.20”
我運行了gem install mysql2 -v '0.3.20' -- --srcdir=/usr/local/include/mysql
捆綁安裝運行良好,並且說所有東西都已安裝。
bundle list mysql2
評估為:
/Users/vitorqueiroz/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.3.20
-
有其他選擇嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.