我是新來的回報率從Django的到來,回報率是不容易的,我Django的,所以我想請你幫我回報率:無法連接到MySQL
當我嘗試做rake db:migrate
或rake features
或任何關於rake
我看到this
有3件事我不明白:爲什麼不RoR連接到MySQL?爲什麼我看到這個耙錯誤?以及爲什麼我看到ansicoon錯誤...我已經安裝了它3次(但這不是一個重要的錯誤,所以如果你不知道如何修復它,那很好)我還安裝了最新版本或今天耙
我有導軌3,Windows XP的32位,SP3,我安裝使用railsinstaller
ROR的database.yml
development:
adapter: mysql
database: selvista
username: root
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
adapter: mysql
database: selvista_test
username: root
pool: 5
timeout: 5000
production:
adapter: mysql
database: selvista_prod
username: root
pool: 5
timeout: 5000
cucumber:
<<: *test
的Gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql'
gem 'rake', '0.9.2.2'
#cucumber and some other gems
gem 'cucumber'
gem 'database_cleaner'
gem 'cucumber-rails'
gem 'capybara'
gem 'rspec', '2.8'
gem 'rspec-rails', '2.8'
gem 'launchy'
gem 'spork'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
如果你需要看到任何其他文件告訴我,我習慣於Django你有5個文件,你可以添加其他文件,如果你需要的話,這裏有軌道上的紅寶石我有很多文件夾和文件,我還不知道哪些文件很重要,哪些文件不重要
你正在運行的Ruby 1.8.7。除非你有特殊原因,否則你應該運行最新版本。我看到你使用了[RailsInstaller](http://railsinstaller.org)。最新版本的RailsInstaller附帶Ruby 1.9.2。但我推薦[RubyInstaller](http://rubyinstaller.org),然後只需要'gem install rails'和其他寶石。 – danneu 2012-01-29 23:26:10