[Ruby on Rails Issue] When Setting Sqlite version on the Gemfile, Show error "An error occurred while installing sqlite3 ",

Issue:

Gem files will remain installed in /tmp/bundler20140825-31835-p0c0p/sqlite3-1.3.9/gems/sqlite3-1.3.9 for inspection.
Results logged to /tmp/bundler20140825-31835-p0c0p/sqlite3-1.3.9/extensions/x86-linux/1.9.1/sqlite3-1.3.9/gem_make.out
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.

Solution:

You need the SQLite3 development headers for the gem’s native extension to compile against. You can install them by running (possibly with sudo):
apt-get install libsqlite3-dev

-----------------------------------------------------------How to install local Gem extension File.

Gem install [your local gem path]

-----------------------------------------------------------

原文地址:https://www.cnblogs.com/haoliansheng/p/3933950.html