gpt4 book ai didi

ruby-on-rails - 设置 Ruby on Rails 时出错

转载 作者:IT王子 更新时间:2023-10-29 06:28:48 24 4
gpt4 key购买 nike

Following this guide ,我正在尝试使用亚马逊的 EC2 设置 Ruby on Rails。对于我的实例,我选择了“Basic 32-bit Amazon Linux AMI 2010.11.1 Beta”。我安装了 ruby​​、sqlite 和 ruby​​gems。我在链接指南的第 3.3 步,即运行以下命令

bundle install

结果如下。我确定我只是错过了一些东西,但我很茫然。有什么建议吗?

Installing sqlite3 (1.3.3) with native extensions /usr/lib/ruby/site_ruby/1.8/rubygems    /installer.rb:529:in `build_extensions': ERROR: Failed to build gem native extension (Gem::Installer::ExtensionBuildError)

/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.3 for inspection.

编辑:按照下面的安装 ruby​​-devel 的建议,除了原来的错误之外,我现在还遇到了这个错误。

Installing sqlite3 (1.3.3) with native extensions /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:529:in `build_extensions': 
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/usr/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).

但是当我尝试运行时

yum install sqlite-devel

有人告诉我:

Package sqlite-devel-3.6.20-1.6.amzn1.i386 already installed and latest version
Nothing to do

最佳答案

除了上面的包之外,确保你已经安装了 gcc 和 make。

除了开发库之外,还需要它们来构建您正在安装的 gem。

关于ruby-on-rails - 设置 Ruby on Rails 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4963792/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com