我安装了rvm(多用户安装:\ curl -L https://get.rvm.io | sudo bash -s stable) 我将用户添加到rvm组 我打电话'rails new testprj' 但我有一个错误消息,它是相同的typping'bundle'命令errer消息 我该怎么办?
我真的很抱歉我的英语......
kitty@ubuntu:~/workspace/rails$ bundle
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tmpdir.rb:85:in `mkdir': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
Permission denied @ dir_s_mkdir - ./.gem.20140211-10050-1th152x
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.0/gems/sqlite3-1.3.8 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/sqlite3-1.3.8/gem_make.out
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tmpdir.rb:85:in `block in mktmpdir'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tmpdir.rb:142:in `create'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tmpdir.rb:85:in `mktmpdir'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:14:in `build'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1436:in `block in build_extensions'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/user_interaction.rb:45:in `use_ui'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1434:in `build_extensions'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:924:in `each'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:924:in `find'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:924:in `find_inactive_by_path'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems.rb:185:in `try_activate'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/vendor/net/http/persistent.rb:12:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/vendored_persistent.rb:3:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/fetcher.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/cli.rb:247:in `install'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/vendor/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/vendor/thor.rb:363:in `dispatch'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/vendor/thor/base.rb:440:in `start'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/cli.rb:10:in `start'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/bin/bundle:20:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
from /usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.3/bin/bundle:20:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.0@global/bin/bundle:23:in `load'
from /usr/local/rvm/gems/ruby-2.1.0@global/bin/bundle:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
答案 0 :(得分:0)
请勿使用SU创建新项目
抱歉,但我不能强调这一点,甚至在大多数指南中都提到过。 问题很可能是Rubygems。
尝试运行以下命令。
sudo gem update --system --no-user-install.
我的猜测是你最初安装在本地目录的哪个地方,捆绑商无法访问。更新系统版本并再次将其设置为默认值将有助于您解决此问题。
答案 1 :(得分:-2)
“Permission denied”是关键字。 您可以尝试使用超级用户(su)创建一个新项目。