Rails 3.2.13运行rails server后出错!提示:Usage:rails new APP_PATH [options] Options:......
来源:互联网 发布:破解密码的软件 编辑:程序博客网 时间:2024/06/05 09:00
今天从github上clone了一个rails项目下来准备运行它,输入:rails server
提示:
Usage: rails new APP_PATH [options]Options: -J, [--skip-javascript] # Skip JavaScript files [--dev] # Setup the application with Gemfile pointing to your Rails checkout [--edge] # Setup the application with Gemfile pointing to Rails repository -G, [--skip-git] # Skip Git ignores and keeps -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) -b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL) [--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9 [--skip-gemfile] # Don't create a Gemfile -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) # Default: sqlite3 -O, [--skip-active-record] # Skip Active Record files [--skip-bundle] # Don't run bundle install -T, [--skip-test-unit] # Skip Test::Unit files -S, [--skip-sprockets] # Skip Sprockets files -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /home/xichen/.rvm/rubies/ruby-1.8.7-p352/bin/ruby -j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library # Default: jqueryRuntime options: -q, [--quiet] # Supress status output -s, [--skip] # Skip files that already exist -f, [--force] # Overwrite files that already exist -p, [--pretend] # Run but do not make any changesRails options: -h, [--help] # Show this help message and quit -v, [--version] # Show Rails version number and quitDescription: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify.Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog. See the README in the newly created application to get going.
后来在stackoverflow中找到了原因。由于我电脑上安装的rails版本是3.2.13,而我要运行的项目的rails版本是4.0.0,要解决这个问题,需要把自己的rails版本升级到4.0.0,或者你从你之前用3.2.13版本创建的rails项目下的script文件夹中拷贝里面的rails这个文件到你的4.0.0版本项目的script文件夹中就可以解决了!
但是,可能会提示:
Could not find i18n-0.6.4 in any of the sources
Run `bundle install` to install missing gems.
这类的问题,只要运行一下bundle install就可以了!
rails项目的服务器成功运行后,进入项目主页时,又出现如下错误:
这主要是因为那个项目的rails的版本是4.0.0,你只要按照提示运行下命令:
rake db:migrate RAILS_ENV=development
就可以了。这时数据库会被重新创建,你需要重新加入数据。
想更多了解,可以参考:https://github.com/rails/rails/issues/8025
- Rails 3.2.13运行rails server后出错!提示:Usage:rails new APP_PATH [options] Options:......
- Rails
- Rails
- Rails
- rails
- Rails
- rails
- Rails
- Rails
- Rails
- Rails
- Rails
- Rails
- Rails
- Rails
- Rails
- rails
- Rails
- 如何进行数据库,比如ORACLE,SQL SERVER的逆向工程,将数据库导入到PowerDesigner中
- OGNL stack value 值栈(主要参考官方手册)
- strcpy函数和mencpy函数的解释和区别分析
- 设计模式C++描述----09.桥接(Bridge)模式
- 每个人都可以听到独一无二的音乐,音乐众包平台Audiodraft帮音乐人找到销售的出口
- Rails 3.2.13运行rails server后出错!提示:Usage:rails new APP_PATH [options] Options:......
- sql(join中on与where区别)
- 数据持久化之sharedpreference的使用
- eclipse 工具中关联 tomcat 源代码
- C# 数据库操作通用代码段
- js 判断svg插件(adobe viewer)
- ecshop购物车重登陆不丢失数据
- Android应用开发学习笔记之相对布局
- BOM相关性维护