【问题标题】:GitHub Import: Could not locate GemfileGitHub 导入:找不到 Gemfile
【发布时间】:2015-01-21 18:55:54
【问题描述】:

我从“GitHub”导入了一个 Rails 应用程序,https://github.com/farra/goo.git

在尝试执行 bundle install 时,它显示“无法找到 Gemfile”。

该存储库实际上没有下面列出的文件。

Gemfile、Gemfile.lock 和 config.ru

我需要一些帮助来继续该申请。

有没有办法为该应用程序创建一个 Gemfile 及其必要的 Gem?

提前谢谢你...

【问题讨论】:

  • 我在该存储库中没有看到 Gemfile。不过,您是否按照说明进行操作 posted here
  • 我认为您不需要创建 Gemfile。您有时间查看 config/environment.rb 文件吗?此应用程序使用 Rails 2.3.4。安装 rails 2.3.4 gem 并尝试做rake gems:install
  • 您好,该应用程序内部有旧的 ruby​​ 和 rails 版本,因此您必须根据应用程序配置进行安装。还有一个 bundler 是个新东西,它是从 rails3 及以上版本开始的,检查 rails2 命令,它绝对适合你。

标签: ruby-on-rails github git-clone gemfile gemfile.lock


【解决方案1】:

这是一个非常遗留的代码库,并且捆绑器未初始化。因此,为了安装它的 gem 文件,您需要运行以下命令:

rake gems:install

检查他们的环境文件: config/environment.rb

他们已经定义了一些可能的步骤来运行该项目,我认为您应该仔细阅读它们。供大家参考,我在这里再次分享:

rails goo
cd goo
script/plugin install git://github.com/dcu/nanite-rails.git
./script/generate nanite
./script/generate agent counter schedule count
./script/generate model Count total:integer interval:integer
./script/generate controller counts
rake db:migrate
modify environment.rb
modify routes.rb
setup passenger vhosts # for production server
edit the counts_counter and the count nanite agent 

我希望我的回答现在可以为您提供足够的信息以继续前进。谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-03-20
    • 2017-07-12
    • 1970-01-01
    • 2019-03-17
    • 1970-01-01
    • 2017-03-27
    • 1970-01-01
    相关资源
    最近更新 更多