質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 4

Ruby on Rails4はRubyによって書かれたオープンソースのウェブフレームワークです。 Ruby on Railsは「設定より規約」の原則に従っており、効率的に作業を行うために再開発を行う必要をなくしてくれます。

Q&A

解決済

1回答

3154閲覧

rake db:migrateに失敗する

azuno_mix

総合スコア71

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 4

Ruby on Rails4はRubyによって書かれたオープンソースのウェブフレームワークです。 Ruby on Railsは「設定より規約」の原則に従っており、効率的に作業を行うために再開発を行う必要をなくしてくれます。

0グッド

0クリップ

投稿2016/09/28 01:41

###前提・実現したいこと
bundle exec rake db:migrate を完了させたい

###発生している問題・エラーメッセージ

rake db:migrate, bundle exec rake db:migrate ともにエラーが発生し完了できません。

bundle exec rake db:migrate Ignoring bcrypt-3.1.11 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.11 Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2 Ignoring byebug-9.0.4 because its extensions are not built. Try: gem pristine byebug --version 9.0.4 Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2 Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2 Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10 Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7 Ignoring kgio-2.10.0 because its extensions are not built. Try: gem pristine kgio --version 2.10.0 Ignoring mysql2-0.3.21 because its extensions are not built. Try: gem pristine mysql2 --version 0.3.21 Ignoring nokogiri-1.6.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.8 Ignoring raindrops-0.16.0 because its extensions are not built. Try: gem pristine raindrops --version 0.16.0 Ignoring rdiscount-1.6.8 because its extensions are not built. Try: gem pristine rdiscount --version 1.6.8 Ignoring rmagick-2.15.4 because its extensions are not built. Try: gem pristine rmagick --version 2.15.4 Ignoring sqlite3-1.3.11 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.11 Ignoring unicorn-5.1.0 because its extensions are not built. Try: gem pristine unicorn --version 5.1.0 rake aborted! LoadError: incompatible library version - /usr/local/rvm/gems/ruby-2.2.4/gems/bcrypt-3.1.11/lib/bcrypt_ext.so /usr/local/rvm/gems/ruby-2.2.4/gems/bcrypt-3.1.11/lib/bcrypt.rb:16:in `require' /usr/local/rvm/gems/ruby-2.2.4/gems/bcrypt-3.1.11/lib/bcrypt.rb:16:in `rescue in <top (required)>' /usr/local/rvm/gems/ruby-2.2.4/gems/bcrypt-3.1.11/lib/bcrypt.rb:12:in `<top (required)>' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:91:in `require' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:91:in `block (2 levels) in require' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `each' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `block in require' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `each' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `require' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler.rb:106:in `require' /home/nowall.inc/current/config/application.rb:6:in `<top (required)>' /home/nowall.inc/current/rakefile:4:in `require' /home/nowall.inc/current/rakefile:4:in `<top (required)>' /usr/local/rvm/gems/ruby-2.2.4/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in `load' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in `kernel_load' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:27:in `run' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/cli.rb:332:in `exec' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/cli.rb:20:in `dispatch' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/cli.rb:11:in `start' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/exe/bundle:34:in `block in <top (required)>' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/exe/bundle:26:in `<top (required)>' /usr/local/rvm/gems/ruby-2.2.4/bin/bundle:23:in `load' /usr/local/rvm/gems/ruby-2.2.4/bin/bundle:23:in `<main>' /usr/local/rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>' LoadError: cannot load such file -- 2.3/bcrypt_ext /usr/local/rvm/gems/ruby-2.2.4/gems/bcrypt-3.1.11/lib/bcrypt.rb:14:in `require' /usr/local/rvm/gems/ruby-2.2.4/gems/bcrypt-3.1.11/lib/bcrypt.rb:14:in `<top (required)>' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:91:in `require' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:91:in `block (2 levels) in require' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `each' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `block in require' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `each' /usr/local/rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `require'

###試したこと
Rubyのバージョンアップ 2.2.3 => 2.2.5
bundlerのバージョンアップ

###補足情報(言語/FW/ツール等のバージョンなど)
Vagrant上に開発環境を作っています。

Rails4.2

ホスト Mac
ゲスト CentOS6

Vagrantを最初から構築するなども試しましたが、うまくいきませんでした。
何かヒントでもいただければ幸いです。
よろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

Try: gem pristine xxxxというエラーがたくさん出ていますね。
コマンドgem pristine --allを実行後、migrationを行ってみて下さい。

投稿2016/09/28 01:53

yuukive

総合スコア40

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

azuno_mix

2016/09/28 03:32

ご回答いただきありがとうございます。 gem pristine した後で、 「DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.」 というエラーが出るようになりました。
yuukive

2016/09/28 04:09 編集

Sprocketsを使用しているgemがSprockets バージョン3.7で非推奨になった記述をしているのが原因だと思います。 一応、エラーではなくただのWARNINGなのでそのままでも使用できるかと思いますが、 気になるようでしたら以下参考にしてみて下さい。 [SprocketsでのWarning](https://teratail.com/questions/43607)
azuno_mix

2016/09/28 12:31

警告なので、問題ないんですね。 ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問