【问题标题】:error generating new app with rails 4.0.0.rc1 on Linux Mint 14在 Linux Mint 14 上使用 rails 4.0.0.rc1 生成新应用程序时出错
【发布时间】:2013-05-09 09:36:18
【问题描述】:

我已经在 Linux Mint v14 Nadia 上安装了 rails 4.0.0.rc1。

当我跑步时

rails new something

这给了我错误(我将只放最后几行):

创建供应商/资产/样式表/.keep 运行捆绑安装 /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/ui.rb:36:in initialize': undefined method[]' for # (NoMethodError) 来自 /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:in new' from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:ininitialize' 来自 /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:in new' from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:indispatch' 来自 /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:386:in start' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:inblock in ' 来自 /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in with_friendly_errors' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in'

然后我更改目录以检查依赖关系:

cd something
bundle check

上面写着:

解决依赖关系... Bundler 无法满足您的 Gemfile 的依赖关系。 使用 bundle install 安装缺少的 gem。

然后我运行:

捆绑安装

它正在显示:

Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Enter your password to install the bundled RubyGems to your system: 
Installing rake (10.0.4) 
Using i18n (0.6.4) 
Using minitest (4.7.4) 
Using multi_json (1.7.3) 
Using atomic (1.1.9) 
Using thread_safe (0.1.0) 
Using tzinfo (0.3.37) 
Using activesupport (4.0.0.rc1) 
Using builder (3.1.4) 

...等等,这需要一个多小时并且仍在运行。

我认为这里发生了一些奇怪的事情。 也许我的安装不正确...

【问题讨论】:

  • 你运行的是什么版本的 ruby​​?
  • Ruby 版本为 1.9.3

标签: ruby-on-rails linux-mint


【解决方案1】:

我找到了解决方案。 我补充说:

source ~/.bash_profile

转到 .bashrc。

.bash_profile 的内容:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # 将 RVM 作为函数加载到 shell 会话中

【讨论】:

    猜你喜欢
    • 2013-05-18
    • 1970-01-01
    • 1970-01-01
    • 2013-05-02
    • 1970-01-01
    • 2012-12-18
    • 1970-01-01
    • 1970-01-01
    • 2018-01-08
    相关资源
    最近更新 更多