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

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Rails 4不检测应用程序前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
更新到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

什么是奇怪的是,(较旧的)系统宝石将使它开始很好,但不是与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.1Notable 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.
原文链接:https://www.f2er.com/ruby/273649.html

猜你在找的Ruby相关文章