How do I install SQlite3 for Ruby on Rails while using RVM

百般思念 提交于 2019-12-05 02:27:18

You are missing shared libraries to install sqlite3.

Probably one thing that most ROR install instructions or tutorials don't tell you is that when running on Linux you need shared libraries or if your a windows person dll's are missing or incompatible with the version you are trying to run.

I see you are running RVM also. So you should try this.

sudo apt-get install libsqlite3-dev
sudo gem install sqlite3-ruby

If you still have trouble installing the gem try this - drop the sudo in the line and just gem install

gem install sqlite3-ruby -- --with-sqlite3-dir=/usr/local/lib

Additionally it doesn't hurt to update all your libraries for Ubuntu.

Run this first before running the libraries for sqlite3:

sudo apt-get update
sudo apt-get upgrade

It will probably take some minutes to run the update and upgrade. You can also run this from the Admin --> System area . There is a menu that allows you to run all library updates and checks for dependencies which may be missing.

You could also run the sqlite install from the system applications GUI, as it will check dependency programs which may also be needed.

Just remember when something doesn't install like the issue you are having with Ruby on Rails, it usually means that libraries are missing or the incorrect version needed.

jstreebin

Here's a better answer from HEROKU - cannot run git push heroku master

Since you can't use sqlite3 on heroku add this to your Gemfile:

group :production do
  gem 'pg'
end
group :development, :test do
  gem 'sqlite3'
end
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!