导轨

时间:2015-06-16 08:38:30

标签: ruby-on-rails ruby bundler

我在捆绑安装期间遇到了一些错误。我运行了命令/home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/bin/bundle install

以下是错误详情:

Errno::EACCES: Permission denied - /home/circar
  /home/tanmay/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
  /home/tanmay/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
  /home/tanmay/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
  /home/tanmay/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
  /home/tanmay/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
  /home/tanmay/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:203:in `each'
  /home/tanmay/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler.rb:308:in `mkdir_p'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/installer.rb:287:in `create_bundle_path'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/installer.rb:54:in `run'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/installer.rb:18:in `install'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/cli/install.rb:107:in `run'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/cli.rb:158:in `install'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/cli.rb:10:in `start'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/bin/bundle:20:in `block in <top (required)>'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/gems/bundler-1.10.3/bin/bundle:18:in `<top (required)>'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/bin/bundle:23:in `load'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/bin/bundle:23:in `<main>'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/bin/ruby_executable_hooks:15:in `eval'
  /home/tanmay/.rvm/gems/ruby-2.0.0-p353@circarindia/bin/ruby_executable_hooks:15:in `<main>'

环境

Bundler   1.10.3
Rubygems  2.1.11
Ruby      2.0.0p353 (2013-11-22 revision 43784) [i686-linux]
GEM_HOME  /home/circar/.gem/ruby/2.0.0/ruby/2.0.0
GEM_PATH  
RVM       1.26.11 (master)
Git       1.7.9.5

Bundler设置:

without
  Set for your local app (/home/tanmay/amit_rails/circarindia/.bundle/config): "development:test"
disable_shared_gems
  Set for your local app (/home/tanmay/amit_rails/circarindia/.bundle/config): "1"
path
  Set for your local app (/home/tanmay/amit_rails/circarindia/.bundle/config): "/home/circar/.gem/ruby/2.0.0"

更新 我的捆绑安装在这些命令之后运行正常。

rm -rf~ / .bundle /〜/ .gem /   rm -rf $ GEM_HOME / bundler /,   rm -rf .bundle /,   rm -rf vendor / cache /,   rm -rf Gemfile.lock, 但我不明白这些命令。这个命令是什么? 提前致谢

1 个答案:

答案 0 :(得分:0)

您的Ruby或环境配置中存在错误。您以tanmay登录,主目录为

/home/tanmay/

但捆绑包尝试写入另一个用户主路径

/home/circar/

GEM_HOME不正确。

GEM_HOME  /home/circar/.gem/ruby/2.0.0/ruby/2.0.0

确保您没有从同事中逐字复制/粘贴某些配置。如果找不到问题,可能需要删除并重新安装RVM。

另外,请确保.bash_profile.profile(或您使用的任何env文件)中的PATH正确且未指向其他家庭用户目录。