运行“gem install rails”时出错

编程入门 行业动态 更新时间:2024-10-20 13:45:37
本文介绍了运行“gem install rails”时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的配置:

  • 操作系统:Ubuntu 12.04
  • rvm版本:1.25.14
  • ruby​​版本:2.1.0p0
  • gem版本:2.2.1

    $ which ruby​​ /home/tauhidul35/.rvm/rubies/ruby-2.1.0/bin/ruby $ which rvm /home/tauhidul35/.rvm/bin/rvm $其中 /home/tauhidul35/.rvm/rubies-2.1.0/bin/gem $捆绑 /home/tauhidul35/.rvm/gems /ruby-2.1.0@global/bin/bundle

现在当我运行命令时,出现错误:

$ gem install rails 错误:执行gem时(NoMethodError)未定义方法`ord 'for nil:NilClass

如果我运行命令,则会收到错误消息:

$ sudo apt-get install rails E:无法找到软件包导轨

我是 Ubuntu 和 on Rails 中的新成员。请帮助我。

解决方案

感谢所有人的帮助。 最后解决了这个问题,当我更新我的电脑使用Ubuntu更新管理器。 我不知道为什么更新后解决了问题。 但我相信它可以通过更新所有方法来解决。 特别感谢majioa。

My configuration:

  • Operating System: Ubuntu 12.04
  • rvm version: 1.25.14
  • ruby version: 2.1.0p0
  • gem version: 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

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. Please help me.

解决方案

Thanks to all for your help. At last this problem is solved, when I update my computer using 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.

更多推荐

运行“gem install rails”时出错

本文发布于:2023-10-15 03:02:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1493048.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:gem   install   rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!