gpt4 book ai didi

ruby-on-rails - Rails 安装 Ubuntu 12.04 期间出错

转载 作者:行者123 更新时间:2023-12-04 10:40:37 25 4
gpt4 key购买 nike

我正在 Ubuntu 机器上安装 rails,到目前为止,我在阅读以下教程时没有遇到任何问题:

https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
http://pragashblog.blogspot.com/2012/05/setting-up-rvm-ruby-and-rails-on-ubuntu.html

但是,当我尝试安装 rails 时:

gem 安装 rails

我收到以下错误:

Building native extensions.  This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-1.9.3-p374/bin/ruby extconf.rb
creating Makefile

make
compiling generator.c
make: I.: Command not found
make: [generator.o] Error 127 (ignored)
linking shared-object json/ext/generator.so
make: shared: Command not found
make: [generator.so] Error 127 (ignored)

make install
compiling generator.c
make: I.: Command not found
make: [generator.o] Error 127 (ignored)
linking shared-object json/ext/generator.so
make: shared: Command not found
make: [generator.so] Error 127 (ignored)
/usr/bin/install -c -m 0755 generator.so /usr/local/rvm/gems/ruby-1.9.3-p374/gems/json- 1.7.6/lib/json/ext
/usr/bin/install: cannot stat `generator.so': No such file or directory
make: *** [/usr/local/rvm/gems/ruby-1.9.3-p374/gems/json-1.7.6/lib/json/ext/generator.so] Error 1


Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p374/gems/json-1.7.6 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p374/gems/json-1.7.6/ext/json/ext/generator/gem_make.out

显然,我已经检查过 make 是否可用,并且它在 PATH 上。事实上, 这使得 其中 哪个房车给出以下结果:
/usr/bin/make
/usr/local/rvm/bin/rvm

所以......我不认为它与PATH有关。

有任何想法吗??我该怎么办?

最佳答案

您缺少必需的软件包:

rvm get head
rvm requirements run
rvm remove 1.9.3
rvm use 1.9.3 --install --default
gem install rails

关于ruby-on-rails - Rails 安装 Ubuntu 12.04 期间出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14635232/

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