gpt4 book ai didi

ruby-on-rails - Rails 4 不检测应用程序

转载 作者:行者123 更新时间:2023-12-03 15:16:15 25 4
gpt4 key购买 nike

更新到 Rails 4 后,我试图启动服务器,但它无法启动。简而言之,应用程序似乎没有被“检测到”,就像那里没有应用程序一样。

~ $ bundle exec rails server
Usage:
rails new APP_PATH [options]

Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /app/vendor/ruby-2.0.0/bin/ruby
-b, [--builder=BUILDER] # Path to some application builder (...
-m, [--template=TEMPLATE] # Path to some application template (...
[--skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle] # Don't run bundle install

奇怪的是,(较旧的)系统 gem 可以让它很好地启动,但不适用于 Bundler。

为什么 Rails 不启动?

我尝试浏览 CLI 源代码,但我无法掌握发生了什么。

(使用 Edge Rails 4.0.0.beta 和 Ruby 2.0.0.rc)

如果您想知道,这里是目录列表:
~ $ ls
app config db Gemfile lib mock Rakefile script tmp
bin config.ru features Gemfile.lock log public README.md spec vendor

最佳答案

Rails 4 确实改变了它的启动方式。

幸运的是,您不必运行 rails-new ,因为有一个方便的任务。

Rails 4 Release Notes :

6.1  Notable changes

  • Your app's executables now live in the bin/ dir. Run rake rails:update:bin to get bin/bundle, bin/rails, and bin/rake.

关于ruby-on-rails - Rails 4 不检测应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14841575/

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