安装 Ruby on Rails 4.0.0 时出错 - 编译 atomic_reference.c 时出错 [英] Error installing Ruby on Rails 4.0.0 - error compiling atomic_reference.c

查看:36
本文介绍了安装 Ruby on Rails 4.0.0 时出错 - 编译 atomic_reference.c 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 Rails 4.0.0 按照教程,但出现以下错误:

I am attempting to install Rails 4.0.0 as per the tutorial, but am getting the following error:

gez@akira:~$ gem install rails --version 4.0.0 --no-ri --no-rdoc
Fetching: i18n-0.6.4.gem (100%)
Successfully installed i18n-0.6.4
Fetching: multi_json-1.7.7.gem (100%)
Successfully installed multi_json-1.7.7
Fetching: tzinfo-0.3.37.gem (100%)
Successfully installed tzinfo-0.3.37
Fetching: atomic-1.1.10.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

/home/gez/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
creating Makefile

make
compiling atomic_reference.c
linking shared-object atomic_reference.so

make install
/usr/bin/install -c -m 0755 atomic_reference.so /home/gez/.rvm/gems/ruby-2.0.0-p247@railstut_rails_4_0/gems/atomic-1.1.10/lib/home/gez/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-linux
/usr/bin/install: cannot create regular file `/home/gez/.rvm/gems/ruby-2.0.0-p247@railstut_rails_4_0/gems/atomic-1.1.10/lib/home/gez/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-linux': No such file or directory
make: *** [install-so] Error 1


Gem files will remain installed in /home/gez/.rvm/gems/ruby-2.0.0-p247@railstut_rails_4_0/gems/atomic-1.1.10 for inspection.

似乎两条路径已合并,但作为 Rails/Ruby 的新手,我不确定如何继续.之前的所有步骤似乎都已成功完成,没有出现错误.

It appears that two paths have become merged, but being new to Rails / Ruby I am unsure how to proceed. All previous steps appear to have completed successfully without errors.

我的系统是 Linux Mint x86_64(基于 Debian).

My system is Linux Mint x86_64 (Debian based).

推荐答案

看起来 Rails 4.0 需要 RubyGems 2.0.3,所以命令

It looks like Rails 4.0 needs RubyGems 2.0.3, so the command

gem update --system 2.0.3

应该可以.我已经相应地更新了教程.

should work. I've updated the tutorial accordingly.

这篇关于安装 Ruby on Rails 4.0.0 时出错 - 编译 atomic_reference.c 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆