gpt4 book ai didi

ruby-on-rails - rails 无法识别项目

转载 作者:数据小太阳 更新时间:2023-10-29 08:54:36 24 4
gpt4 key购买 nike

我可以使用 Rails 创建一个新项目,我可以使用类似的东西

rails 迁移 ...

我(正确地)得到一个错误,因为缺少 sqlite gem。

但是当我尝试使用 rails migration ... 以及我从 github checkout 的项目时,它无法识别我得到的是一个 rails 项目:

Usage:
rails new APP_PATH [options]

Options:
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)
# Default: sqlite3
-O, [--skip-active-record] # Skip Active Record files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
-J, [--skip-prototype] # Skip Prototype files
-T, [--skip-test-unit] # Skip Test::Unit files
-G, [--skip-git] # Skip Git ignores and keeps
-b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL)
[--edge] # Setup the application with Gemfile pointing to Rails repository
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /usr/bin/ruby1.8
[--skip-gemfile] # Don't create a Gemfile

然后继续。有什么想法吗?

编辑:这可能是一个重要的细节,之前我的 Rails 根本无法工作。我必须 cp/usr/bin/ruby 到/usr/bin/local/ruby

最佳答案

我怀疑来自 Github 的项目可能使用 Rails 2.x,而您可能有 Rails 3.x。

要么是那样,要么是您从 Github 获取文件夹后忘记“cd”到文件夹中。

您之前提到过您的 Rails 根本无法正常工作。如果是这种情况,并且您需要在不同版本的 Rails 之间切换,那么可以尝试使用 rvm。真的很受欢迎:http://rvm.beginrescueend.com/

关于ruby-on-rails - rails 无法识别项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4677491/

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