【问题标题】:Building ember.js fails on OS X 10.8.2在 OS X 10.8.2 上构建 ember.js 失败
【发布时间】:2013-01-09 07:27:43
【问题描述】:

在安装了以下工具的 Mac OS X 系统 (10.8.2) 上:

  • Ruby,1.9.3p362(2012-12-25 修订版 38607)[x86_64-darwin12.2.0],通过 brew
  • 捆绑器,1.2.3 通过gem install bundler
  • 耙子,10.0.3 通过gem install rake

无法从源代码构建 Ember。下面是运行rake dist时的错误日志:

± ~/dev/ember.js (master ✓) ⚡ rake dist
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25: warning: redundant nested repeat operator
rake aborted!
cannot load such file -- bundler/setup
/Users/foo/dev/ember.js/Rakefile:3:in `<top (required)>'
(See full trace by running task with --trace)

± ~/dev/ember.js (master ✓) ⚡ rake dist --trace
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25: warning: redundant nested repeat operator
rake aborted!
cannot load such file -- bundler/setup
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/foo/dev/ember.js/Rakefile:3:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:72:in `block in run'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/usr/local/Cellar/ruby/1.9.3-p362/lib/ruby/gems/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p362/bin/rake:23:in `load'
/usr/local/Cellar/ruby/1.9.3-p362/bin/rake:23:in `<main>'

通过查看 Ember Data 构建说明和 #emberjs 中的讨论,您似乎需要先运行 bundle。这样做会成功安装一些捆绑包,尽管最后会提示输入管理员密码“将捆绑的 RubyGems 安装到您的系统中”。

如果您随后运行此命令来查看安装了哪些 gem,您会看到一个 gem 特别拒绝安装。按照建议运行 bundle install 并不能解决这个问题。

± ~/dev/ember.js (master ✓) ⚡ bundle exec rake -T
https://github.com/pangratz/github_downloads.git (at master) is not checked out. Please run `bundle install`

来自 Twitter 的建议是运行 bundle rake dist。这会产生:

± ~/dev/ember.js (master ✓) ⚡ bundle rake dist
Could not find task "rake".

另一个是bundle exec rake dist

± ~/dev/ember.js (master ✓) ⚡ bundle exec rake dist
https://github.com/pangratz/github_downloads.git (at master) is not checked out. Please run `bundle install`

此时运行bundle install 会安装gem 列表,但最后要求输入管理员密码 并报告成功。 #emberjs 的一个想法是,这意味着它将 gems 安装到我的系统中,而不是沙盒环境中, 是这里真正的问题。

可以做些什么来克服这个 bundle/rake 错误?

【问题讨论】:

    标签: javascript rake ember.js bundler


    【解决方案1】:

    这是一个对我有用的解决方案:

    cd <your ember clone>
    curl -L https://get.rvm.io | bash -s stable --ruby
    rvm install 1.9.3
    rvm use 1.9.3
    rvm rubygems latest
    bundle install
    rake dist
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-11
      • 2014-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-17
      • 2011-12-01
      • 1970-01-01
      相关资源
      最近更新 更多