bundle updateを実行すると
エラーが表示されます
An error occurred while installing sqlite3 (1.3.8), and Bundler cannot
continue.
Make sure that gem install sqlite3 -v '1.3.8'
succeeds before bundling.
こちらのエラーに対してはどう対処すればいいのでしょうか?
ちなみにgem install sqlite3 -v '1.3.8'を実行すると
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
と表示されてしまいます。
よろしくお願いします
気になる質問をクリップする
クリップした質問は、後からいつでもMYページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
回答2件
0
ベストアンサー
Gemfileの例を回答に入れてみました。pgだけの状態でsqlite3を入れてインストールできました。
- ruby2.2.0
なので少し環境が違いますが、ちなみにbrewでsqlite入れてますか?
brew list sqlite3の結果は以下
/usr/local/Cellar/sqlite/3.8.9/bin/sqlite3 /usr/local/Cellar/sqlite/3.8.9/include/ (2 files) /usr/local/Cellar/sqlite/3.8.9/lib/libsqlite3.0.dylib /usr/local/Cellar/sqlite/3.8.9/lib/pkgconfig/sqlite3.pc /usr/local/Cellar/sqlite/3.8.9/lib/ (2 other files) /usr/local/Cellar/sqlite/3.8.9/share/man/man1/sqlite3.1
投稿2015/05/10 13:29
総合スコア29
0
依存関係でエラーが出る場合、以下の手順で上手く行く場合があります。
- Gemfile.lockを削除する
- bundle --path=vendor/bundle などでインストール先を指定する
rails new
後のbundle install
でpathを指定しなかった場合、グローバルにインストールされます。pathを指定することでそのRailsプロジェクト内のみで利用するようにgemをインストールできます。
source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.1' # Use postgresql as the database for Active Record gem 'pg' gem 'sqlite3' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.1.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Unicorn as the app server # gem 'unicorn' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' # Access an IRB console on exception pages or by using <%= console %> in views gem 'web-console', '~> 2.0' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' end
投稿2015/05/10 12:44
編集2015/05/10 13:27総合スコア29
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/05/10 13:07
2015/05/10 13:08
2015/05/10 13:23
あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/05/10 14:15
2015/05/10 14:22
2015/05/10 14:22
2015/05/10 14:47
2015/05/10 14:50
2015/05/10 14:50
2015/05/10 14:52
2015/05/10 14:55
2015/05/10 15:22