我在我的新服务器上安装了bundler gem,当我尝试执行时bundle install,它失败并出现此错误:
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/usr/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied - /var/lib/gems (Errno::EACCES)
Run Code Online (Sandbox Code Playgroud)
我的服务器是Debian wheezy(7.1),安装了默认的ruby 1.9.3软件包.我这样配置/etc/gemrc :gem: --user-install允许用户在本地安装gem.
bundler gem安装在我的用户的gems目录中,~/.gem就像我想要的命令:( gem install bundler没有sudo).但捆绑者希望安装宝石/var/lib/gems而不是我的宝石目录:(
我不明白Bundler有什么问题...为什么它不尝试在我想要的地方安装gem(在我的gems local dir中)?
ps:在我的笔记本电脑中,安装了archlinux和默认的ruby 2.0.0软件包,我没有使用bundler来安装用户的宝石.
有没有办法评论define_method在YardDoc中定义的方法?
我试过这个:
%w(one two three).each do |type|
# The #{type} way
# @return [String] the #{type} way
define_method("#{type}_way") do ... end
end
Run Code Online (Sandbox Code Playgroud)
但是,不幸的是,没有工作.