Rails 4 - Heroku Sqlite3错误 [英] Rails 4 - Heroku Sqlite3 error

查看:101
本文介绍了Rails 4 - Heroku Sqlite3错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Herouku遇到了一些麻烦。我无法推送,因为有以下错误:

  Gem文件将保持安装在/ tmp / build_2jdec30lsc3bu / vendor / bundle / ruby / 2.0.0 / gems / sqlite3-1.3.7进行检查。 
结果记录到/tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
安装sqlite3时出错(1.3。 7),Bundler无法继续。
确保`gem install sqlite3 -v'1.3.7'`捆绑成功。

!无法通过Bundler安装宝石。

!检测到Heroku不支持的sqlite3 gem。
! https://devcenter.heroku.com/articles/sqlite3


!推送被拒绝,未能编译Ruby / Rails应用程序

我无法解决它。



我试过以下内容:

  group:development,: test do 
gem'sqlite3'
end

group:production do
gem'pg'
end

我一直得到相同的错误。我甚至试图完全删除sqlite3。同样恼人的错误。我确保在运行 git push heroku master 之前推送我的更改。有任何想法吗?或者我可能会放弃Heroku ...

解决方案

我以前遇到过类似的问题。这适用于我在我的Gemfile中:

  gem'sqlite3',group:[:development,:test] 
gem'pg',group:[:production]

另外,在你的本地git checkout中,执行命令 heroku config 。确认输出设置了以下环境变量:

  RACK_ENV:生产
RAILS_ENV:生产

试一试。它是否适合你?


I'm having some trouble with Herouku. I can't push because of the following error:

Gem files will remain installed in  /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7 for inspection.
       Results logged to /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !     
 !     Detected sqlite3 gem which is not supported on Heroku.
 !     https://devcenter.heroku.com/articles/sqlite3
 !

 !     Push rejected, failed to compile Ruby/Rails app

And I can't solve it.

I have tried the following:

group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end

And I keep getting the same error. I have even tried to remove sqlite3 completely. Same annoying error. I made sure to push my changes before running git push heroku master. Any ideas? Or I will probably give up on Heroku...

解决方案

I've had similar problems before. This works for me in my Gemfile:

gem 'sqlite3', group: [:development, :test]
gem 'pg', group: [:production]

Also, in your local git checkout, execute the command heroku config. Confirm that the output has the following environment variables set:

RACK_ENV:                     production
RAILS_ENV:                    production

Give that a shot. Does it work for you?

这篇关于Rails 4 - Heroku Sqlite3错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆