gem install bundler的时候报错
ruby吧
全部回复
仅看楼主
level 1
Jason-hong 楼主
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /usr/local/rvm/gems/ruby-2.2.0/wrappers/ruby
这是什么原因呢?
2015年08月04日 03点08分 1
level 12
你是用普通用户
运行了系统上的 rvm,
而无法去存取系统上的目录。
建议你把 /usr/local/rvm 这里的 rvm 解除安装,
用普通用户的身分,
安装 rvm 在 ~/.rvm/ 里,
之后一切安装任何版本 ruby,
而不要用到 root 的身分。
2015年08月05日 00点08分 2
谢谢解答,还有一个问题,我贴在三楼,希望能解答一下。
2015年08月05日 02点08分
ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/yjwo215/.gemrc 这种错误和楼上一样么?怎么解决??
2015年12月03日 05点12分
@侃侃看看可可可 可能是你之前用 sudo 做了些 rvm 或 gem 的動作,造成一些文檔成為 root 所屬,使得以普通用戶再安裝造成無法寫入。可以用 root 身分, chown -R yjwo215 ~yjwo215/.rvm 確保該用戶的 .rvm 裡,沒有屬root的文檔。
2015年12月03日 05点12分
@侃侃看看可可可 再用 yjwo215 身分去做 gem 等動作。
2015年12月03日 05点12分
level 1
Jason-hong 楼主
我运行bundle的时候报错
然后根据提示运行bundle update
最后我运行gem install mysql2 -v '0.3.14'
还是无解
2015年08月05日 02点08分 3
level 12
如果你是为了装rails用的话,
会有点复杂。
可先做个试验看看:
[username@ithelp ~]$ mkdir Zoo
[username@ithelp ~]$ echo 2.2.2 >> Zoo/.ruby-version
[username@ithelp ~]$ echo myset >> Zoo/.ruby-gemset
[username@ithelp ~]$ cd Zoo
[username@ithelp ~]$ cd Zoo
ruby-2.2.2 - #gemset created /home/username/.rvm/gems/ruby-2.2.2@myset
ruby-2.2.2 - #generating myset wrappers..........
$ rvm list
rvm rubies
ruby-2.0.0-p0 [ x86_64 ]
ruby-2.0.0-p195 [ x86_64 ]
ruby-2.0.0-p247 [ x86_64 ]
ruby-2.1.0 [ x86_64 ]
ruby-2.1.1 [ x86_64 ]
ruby-2.1.2 [ x86_64 ]
ruby-2.1.4 [ x86_64 ]
ruby-2.1.5 [ x86_64 ]
ruby-2.2.0 [ x86_64 ]
* ruby-2.2.1 [ x86_64 ]
=> ruby-2.2.2 [ x86_64 ]
# => - current
# =* - current && default
# * - default
[username@ithelp Zoo]$ rvm gemset list
gemsets for ruby-2.2.2 (found in /home/username/.rvm/gems/ruby-2.2.2)
(default)
em
global
=> myset
[username@ithelp Zoo]$ bundle init
Writing new Gemfile to /home/username/Zoo/Gemfile
[username@ithelp Zoo]$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.6)
bundler (1.10.2)
bundler-unload (1.0.2)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
io-console (0.4.3)
json (1.8.1)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
[username@ithelp Zoo]$ vi Gemfile
# A sample Gemfile
source "https://rubygems.org"
gem "mysql2"
[username@ithelp Zoo]$ bundle
Fetching gem metadata from https://rubygems.org/..
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
with native extensions Installing mysql2 0.3.19
Using bundler 1.10.2
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
[username@ithelp Zoo]$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.6)
bundler (1.10.2)
bundler-unload (1.0.2)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
io-console (0.4.3)
json (1.8.1)
mysql2 (0.3.19)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
2015年08月05日 03点08分 4
谢谢啊,这个问题已经解决了,现在还有个问题,我安装的redmine这个东西,然后安装好插件之后登陆就报错了。
2015年08月05日 05点08分
level 1
Jason-hong 楼主
这个错误不知道是不是ruby的原因,因为安装redmine插件之前要使用一个命令
rake redmine:plugins:migrate RAILS_ENV=production
然后,我登陆的时候就不行了,即使把插件卸载掉也这样,请问下这个问题的作用是什么?
2015年08月05日 05点08分 5
level 12
你这个看起来是nginx,
或说前端的web服务器,
所回应的讯息,
只有说明后端无法运行,
但看不出原因,
所需要看 redmine 本身可能是运行在哪一个 port,
要看命令行里运行时,
会出现错误讯息。
或者假说是跑在 9999 的port,
就用访问 localhost:9999 看出现什麼讯息。
2015年08月05日 06点08分 6
level 12
[我倒]
2015年12月04日 16点12分 8
level 12
[投降]
2015年12月04日 16点12分 9
level 12
[微笑]
2015年12月04日 16点12分 10
level 12
[帅哥]
2015年12月04日 16点12分 11
level 12
[茶杯]
2015年12月08日 16点12分 12
level 12
[haha]
2015年12月08日 16点12分 15
level 1
哇,感谢2楼@油豆腐细粉,一语中的,终于把环境都配置好了,谢谢解答啦!
2016年10月29日 09点10分 16
level 4
sudo
2016年10月29日 18点10分 17
1