加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-16 20:33:29 所属栏目:百科 来源:网络整理
导读:更新到Rails 4之后,我试图启动服务器,但不能启动.简单地说,应用程序似乎没有被“检测到”,就像在那里没有应用程序. ~ $bundle exec rails serverUsage: rails new APP_PATH [options]Options: -r,[--ruby=PATH] # Path to the Ruby binary of your choice #
更新到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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读