gpt4 book ai didi

javascript - 在 OS X 10.8.2 上构建 ember.js 失败

转载 作者:行者123 更新时间:2023-11-28 02:30:41 24 4
gpt4 key购买 nike

在 Mac OS X 系统 (10.8.2) 上,安装了这些工具:

  • Ruby,1.9.3p362(2012年12月25日修订版38607)[x86_64-darwin12.2.0],通过brew
  • Bundler,1.2.3,通过 gem 安装 bundle 程序
  • rake,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>'

通过查看 #emberjs 中的 Ember Data 构建说明和讨论,您似乎需要首先运行 bundle。这样做会成功安装一些 bundle ,但最后会提示输入管理员密码“将 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 错误?

最佳答案

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

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

关于javascript - 在 OS X 10.8.2 上构建 ember.js 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14230252/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com