我有一个朋友,他有一个现有的Rails应用程序,根据environment.rb文件,它似乎是在'2.3.4'中构建的。他有一些问题,并让我为他调查。
我习惯使用Rails 3.2 +。
我下载了他的文件并运行了bundle
命令并得到了这个回复:
Could not locate Gemfile
然后我尝试通过运行rails s
命令在本地检出该站点。我回来了:
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/stevenbrooks1111/.rvm/rubies/ruby-1.9.3-p429/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip .gitignore file
[--skip-keeps] # Skip source control .keep files
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-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
-T, [--skip-test-unit] # Skip Test::Unit files
[--rc=RC] # Path to file containing extra configuration options for rails command
[--no-rc] # Skip loading of extra configuration options from .railsrc file
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
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.
我希望能够告诉我的朋友问题是什么以及通过网站。它运行的服务器不再接受任何比Rails 3.2更少的东西。
如何在本地运行此服务器?我不知道问题是什么,因为:
答案 0 :(得分:0)
bundle
无效。 Rails 2.3未与bundler集成。
rails s
也不起作用。要在Rails 2.3中启动应用程序服务器,您需要运行
script/server
答案 1 :(得分:0)
添加其他答案,运行ruby --version
和gem list -d rails
,检查您是否安装了正确的版本并在路径上。 (我正在开发一个Rails 2.3项目,这些项目“太大而无法升级”了!)