首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

部署rails到heroku时,Sqlite引起的异常

2013-07-04 
部署rails到heroku时,Sqlite引起的错误解决方案:heroku默认使用pg,所以在Gemfile中,只有开发和测试模式下,

部署rails到heroku时,Sqlite引起的错误

解决方案:

heroku默认使用pg,所以在Gemfile中,只有开发和测试模式下,才使用sqlite3

gem 'sqlite3', :group => [:development, :test]
group :production do
gem 'thin'
gem 'pg'
end

2、删除掉gemfile.lock文件
3、运行 `bundle install --without production
4、运行git add .
5、运行git commit -m "bundle updating sqlite3"
6、运行git push heroku master

热点排行