[英]Error when run “gem install rails”
My configuration: 我的配置:
gem version: 2.2.1 宝石版:2.2.1
$ which ruby /home/tauhidul35/.rvm/rubies/ruby-2.1.0/bin/ruby $ which rvm /home/tauhidul35/.rvm/bin/rvm $ which gem /home/tauhidul35/.rvm/rubies/ruby-2.1.0/bin/gem $ which bundle /home/tauhidul35/.rvm/gems/ruby-2.1.0@global/bin/bundle $ ruby /home/tauhidul35/.rvm/rubies/ruby-2.1.0/bin/ruby $ rvm /home/tauhidul35/.rvm/bin/rvm $ gem /home/tauhidul35/.rvm/rubies/ruby -2.1.0 / bin / gem $捆绑/home/tauhidul35/.rvm/gems/ruby-2.1.0@global/bin/bundle
Now when I run command, I get error: 现在当我运行命令时,我收到错误:
$ gem install rails
ERROR: While executing gem ... (NoMethodError)
undefined method `ord' for nil:NilClass
If I run command, I get error: 如果我运行命令,我会收到错误:
$ sudo apt-get install rails
E: Unable to locate package rails
I am new in Ubuntu and also Ruby on Rails . 我是Ubuntu的新手,也是Ruby on Rails的新手。 Please help me. 请帮我。
Thanks to all for your help. 感谢大家的帮助。
At last this problem is solved, when I update my computer using Ubuntu Update Manager. 当我使用Ubuntu Update Manager更新我的计算机时,最后解决了这个问题。
I don't know why solved the problem after updates. 我不知道为什么更新后解决了这个问题。 But I am sure it is solved by Updating all. 但我确信它是通过更新全部来解决的。
Specially thanks to majioa. 特别感谢majioa。
Remember that you can also 'get certain' of your ruby and gem situation by installing a new ruby with a new gemset. 请记住,您还可以通过安装带有新宝石的新红宝石来“确定”您的红宝石和宝石情况。
You can use rbenv
to install a ruby and gemset to a local path over which you have full permission control, so that you can remove, reinstall, etc. them any time. 您可以使用rbenv
将ruby和gemset安装到您拥有完全权限控制的本地路径,以便您可以随时删除,重新安装等。
You can install a ruby manager like rbenv
by following the instructions here 您可以按照此处的说明安装像rbenv
这样的ruby管理器
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.