Fresh Rails 4 应用程序无法识别“rails"命令,坚持使用“rails new" [英] Fresh Rails 4 app is not recognizing `rails` commands, insists that I use `rails new`

查看:32
本文介绍了Fresh Rails 4 应用程序无法识别“rails"命令,坚持使用“rails new"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 rails new 命令从 Rails 主分支的克隆成功创建了一个新应用程序.该应用程序看起来不错,绝对是 Rails 4.但是当我尝试运行任何其他 rails 命令时,提示给了我:

I've successfully made a new application with the rails new command from a clone of the Rails master branch. The app looks fine, and is definitely Rails 4. But when I try to run any other rails command, the prompt gives me:

Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
  ... etc etc

我试过 railsbundle exec railsbin/rails,都给出相同的提示.我创建一个新的 Rails 4 应用的步骤是:

I've tried rails, bundle exec rails, and bin/rails, all give the same prompt. My steps for creating a new Rails 4 app were:

  1. 将 Rails 主分支克隆到我的本地机器
  2. 创建一个新的 rvm gemset,并使用它 (1.9.3)
  3. 运行 rails/railties/bin/rails new myapp --edge -T --skip-index-html
  4. cd myapp 并运行 bundle installbundle update 以确保
  5. 运行任何rails命令
  1. Clone the Rails master branch to my local machine
  2. Create a new rvm gemset, and use it (1.9.3)
  3. Run rails/railties/bin/rails new myapp --edge -T --skip-index-html
  4. cd myapp and run bundle install and bundle update just to be sure
  5. Run any rails command

我做错了什么?rvm-prompt 表明我使用了正确的 gemset.我注意到的一件事是,即使我从 Gemfile 中删除 jbuilder 并运行 bundle update,它仍然出现在我的 gem list 中.我的 rvm 有问题吗?

What am I doing wrong? rvm-prompt suggests I am using the right gemset. One thing I did notice is that even when I remove jbuilder from my Gemfile and run a bundle update, it still appears in my gem list. Is something wrong with my rvm here?

rails-v 输出是Rails 4.0.0.beta"

rails-v output is 'Rails 4.0.0.beta'

推荐答案

这看起来像一个 bug,反馈给 ruby​​ on rails 问题跟踪:https://github.com/rails/rails/issues

This looks like a bug, report back to ruby on rails issues tracking: https://github.com/rails/rails/issues

这篇关于Fresh Rails 4 应用程序无法识别“rails"命令,坚持使用“rails new"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆