简体   繁体   English

Rails 2.3.8:找不到RubyGem捆绑程序

[英]Rails 2.3.8: Could not find RubyGem bundler

I'm trying to set up a development environment for a legacy Rails 2.3.8 project. 我正在尝试为旧版Rails 2.3.8项目建立开发环境。 I have rails successfully installed, have cloned the git repository, and now am trying to run bundle. 我已经成功安装了rails,已经克隆了git存储库,现在正在尝试运行bundle。

Could not find RubyGem bundler (>= 0) (Gem::LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:214:in activate' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in gem' from /home/[clientsite]/ruby/gems/bin/bundle:18 在/usr/lib/ruby/site_ruby/1.8/rubygems中找不到RubyGem捆绑软件(> = 0)(Gem :: LoadError).rb:214:在/usr/lib/ruby/site_ruby/1.8/rubygems中处于activate' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in gem'from / home / [clientsite] / ruby​​ / gems / bin / bundle:18

(where [clientsite] is not the actual directory name.) (其中[clientsite]不是实际的目录名称。)

Also: which ruby: /usr/bin/ruby which rails: /usr/bin/rails which bundle: /home/ankasa/ruby/gems/bin/bundle 另外:哪个红宝石:/ usr / bin / ruby​​哪个轨道:/ usr / bin / rails哪个捆绑:/ home / ankasa / ruby​​ / gems / bin / bundle

When I try to run rake, I get this: rake aborted! 当我尝试运行rake时,我得到了:rake中止了! no such file to load -- rdoc/task 没有这样的文件要加载-rdoc / task

I assume this is because I can't run bundle. 我认为这是因为我无法运行捆绑包。

Thanks. 谢谢。

A Rails 2.3.8 project does not use bundle to manage its dependencies. Rails 2.3.8项目不使用包来管理其依赖项。 There's no Gemfile. 没有Gemfile。 The required gems are listed in config/environment.rb. 所需的gem在config / environment.rb中列出。

To fix the problem with rake, you need to install rdoc gem, and edit Rakefile file: 要解决rake的问题,您需要安装rdoc gem,并编辑Rakefile文件:

#require 'rake/rdoctask'
require 'rdoc/task'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM