ruby-on-rails - 安装 ruby​​ 1.9.3-p194 时遇到问题

标签 ruby-on-rails rvm

我在一台单独的机器上对我的应用程序进行了一些编辑,我在 heroku 上部署到生产中,这导致了一些错误,现在突然间我在我的主机上遇到了一堆错误。

根据命令行,我的问题是我没有安装 ruby​​ 1.9.3-p194。我不确定我能做些什么来解决这个问题。

$ rvm install ruby-1.9.3-p194
No binary rubies available for: osx/10.7/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.

Installing Ruby from source to: /Users/glider/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194 - #extracted to /Users/glider/.rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/Users/glider/.rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/Users/glider/.rvm/rubies/ruby-1.9.3-p194',
please read /Users/glider/.rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.

最佳答案

如果您使用 railsinstaller.org 安装 rails,则/etc/rvmrc 中存在错误。打开该文件并将 rvm_configure_env 定义的单个字符串更改为三个单独的字符串。

这是带有错误的默认代码:

rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include  CPATH=/opt/sm/pkg/active/include')

这是更正后的代码:
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')

关于ruby-on-rails - 安装 ruby​​ 1.9.3-p194 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12827979/

相关文章:

ruby-on-rails - Ruby Mechanize 表抓取不会捕获整行

ruby-on-rails - 如何更改 gem 包管理器版本?

ruby - hadoop流作业失败无法从SCDynamicStore env加载领域信息:ruby\r:无此类文件或目录

ruby-on-rails - Rails 表单不断返回 nomethoderror

ruby-on-rails - 如何从单个事件记录对象获取列值

ruby-on-rails - 在没有换行符的情况下打印到日志文件 - Ruby on Rails

ruby - RVM在linux上有什么优势?

ruby-on-rails - 将 Date 和 1.month.ago 放在一起?

ruby - 使用 rvm 获取 ruby​​ 1.9.3 的源代码

rvm - 在macports上, 'port select'支持哪些端口?