如何在没有GemFile的情况下设置Rails应用程序?

时间:2011-12-30 13:56:37

标签: ruby-on-rails gemfile

我从github下载了一个rails示例应用程序,但它没有GemFile,我怎么能让它运行? 我尝试rake gems:install,并收到以下错误。我无法弄清楚为什么,任何人都可以提供帮助?非常感谢!

NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from G:/Desktop/20090319-/Rails Examples/showchart/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
...
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
    at C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
DEPRECATION WARNING: Rake tasks in vendor/plugins/gemsonrails/tasks, vendor/plugins/gemsonrails/tasks, vendor/plugins/gemsonrails/tasks, vendor/plugins/gemsonrails/tasks, and vendor/plugins/open_flash_chart/tasks are deprecated. Use lib/tasks instead. (called from <top (required)> at G:/Desktop/20090319-/Rails Examples/showchart/vendor/rails/railties/lib/tasks/rails.rb:10)
** Invoke gems:install (first_time)
** Invoke gems:base (first_time)
** Execute gems:base
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `name' for "RedCloth":String
G:/Desktop/20090319-/Rails Examples/showchart/vendor/rails/railties/lib/rails/gem_dependency.rb:277:in `=='
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `==='
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `block in matching_specs'
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `block in each'
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:409:in `each'
....
C:/Ruby192/bin/rake:19:in `load'
C:/Ruby192/bin/rake:19:in `<main>'
Tasks: TOP => environment

1 个答案:

答案 0 :(得分:0)

只需从新的rails应用程序复制/粘贴Gemfile,然后启动应用程序并尝试找出缺少哪个gem ...: - S