【发布时间】:2013-01-12 13:39:49
【问题描述】:
我是 Rails 新手,我正在尝试将应用程序推送到 heroku(只是一些基本的练习)到目前为止为我工作。当我从 Windows 命令行发出 git push heroku master 时出现以下错误:
**Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native ex
紧张。 /usr/local/bin/ruby extconf.rb 检查 sqlite3.h ... 否 sqlite3.h 丢失。尝试“端口安装 sqlite3 +universal” 或 'yum install sqlite-devel' 并检查您的共享库搜索路径( 这 您的 sqlite3 共享库所在的位置)。 * extconf.rb 失败 *
.
.
.
.
.
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot co
继续。
在捆绑之前确保gem install sqlite3 -v '1.3.7' 成功。
! !无法通过 Bundler 安装 gem。 ! ! Heroku push 被拒绝,无法编译 Ruby/rails 应用
我的 gemfile 看起来像这样:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
#gem 'sqlite3'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
【问题讨论】:
-
添加 gem 后,你运行
bundle install了吗?您是否为 gemfile 执行了git add并正确提交了您的更改? -
宾果游戏!这解决了 Abhir 的问题。 git add Gmgfile 是问题所在。非常感谢 Prakash 编辑代码!
标签: ruby-on-rails windows heroku sqlite gem