-4

我对 Ruby 和 Rails 很陌生。当我想通过键入命令(rails new sample_app)在rails中创建一些application_name时,它正在创建一个新文件夹。在输入假设 rails 控制台命令时,它会在我的目录中生成控制台文件夹,而不是切换到 rails 控制台。我感觉很烦,请帮助我我在哪里做错了,我已经安装了 rails 2.3.14,我在 rails 3.2 上使用了 ruby

热切地等待你的肯定回答..谢谢你

bikram@Bikram:~/rails_projects$ rails console
      create  
      create  app/controllers
      create  app/helpers
      create  app/models
      create  app/views/layouts
      create  config/environments
      create  config/initializers
      create  config/locales
      create  db
      create  doc
      create  lib
      create  lib/tasks
      create  log
      create  public/images
      create  public/javascripts
      create  public/stylesheets
      create  script/performance
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/performance
      create  test/unit
      create  vendor
      create  vendor/plugins
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  Rakefile
      create  README
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  config/database.yml
      create  config/routes.rb
      create  config/locales/en.yml
      create  db/seeds.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_rails_defaults.rb
      create  config/initializers/session_store.rb
      create  config/initializers/cookie_verification_secret.rb
      create  config/environment.rb
      create  config/boot.rb
      create  config/environments/production.rb
      create  config/environments/development.rb
      create  config/environments/test.rb
      create  script/about
      create  script/console
      create  script/dbconsole
      create  script/destroy
      create  script/generate
      create  script/runner
      create  script/server
      create  script/plugin
      create  script/performance/benchmarker
      create  script/performance/profiler
      create  test/test_helper.rb
      create  test/performance/browsing_test.rb
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/index.html
      create  public/favicon.ico
      create  public/robots.txt
      create  public/images/rails.png
      create  public/javascripts/prototype.js
      create  public/javascripts/effects.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/controls.js
      create  public/javascripts/application.js
      create  doc/README_FOR_APP
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log
      create  vendor/rails
4

2 回答 2

0
  1. 删除您的 sample_app 项目并重新安装 Rails - 我可以看到您的 rails 二进制文件是 2.3.x 版本。

  2. 创建新项目

  3. cd 到创建的项目

  4. 然后尝试启动 rails 控制台。

于 2013-10-02T11:23:31.237 回答
0

我建议你从基础开始,这是一个很好的资源:http ://ruby.railstutorial.org/

于 2013-10-02T14:19:56.247 回答