7

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

ただし、レールをインストールしようとすると、次のようになります。

gem install 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上にあることをすでに確認しました。実際、どのmakeどのrvmが次の結果をもたらしますか:/ usr / bin / make / usr / local / rvm / bin / rvm

だから...私はそれがPATHに関連しているとは思わない。

何か案は??私は何をすべきか?

4

2 に答える 2

7

必要なパッケージが不足しています:

rvm get head
rvm requirements run
rvm remove 1.9.3
rvm use 1.9.3 --install --default
gem install rails
于 2013-01-31T23:55:48.620 に答える
5

同じ問題が発生しました...「sudoapt-getinstallbuild-essentials」で修正された後、「rvmreinstall1.9.3」を実行しました。gccをインストールしたときにルビーが気づかなかったのかもしれませんが、それでも私はそれを持っていないと信じていました。

于 2013-01-31T22:48:08.307 に答える