2016-06-11 13 views
0

私はRuby on Rails 4 Essential Trainingに続いてRuby on Railsを使用しています。私は初期の章で、 rails server 'を開き、ブラウザで' localhost:3000 'を開きます。 Connection not EstablishedActiveRecord :: ConnectionNotEstablished Ruby on Rails

だから私は自分のプロジェクトにアクセスすることはできませんし、チュートリアルを上に移動することはできません。

問題はこれです。

また、私とチュートリアルの端末とでは何か違うことに気付きました。私の端末では、WEBrickを起動する前に、次のように表示されます: /home/jmmaglinao16/.rvm/gems/ruby-2.3.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282:警告:循環引数リファレンス - 今すぐ

問題に接続しているかどうかはわかりませんが、それはこれまでのところです。私を助けてください。ありがとうございました。

Gemfile:

source 'rubygems.org' 

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.0.0' 

# Use mysql as the database for Active Record 
gem 'mysql2' 

# Use SCSS for stylesheets 
#gem 'sass-rails', '~> 4.0.0' 

# Use Uglifier as compressor for JavaScript assets 
#gem 'uglifier', '>= 1.3.0' 

# Use CoffeeScript for .js.coffee assets and views 
#gem 'coffee-rails', '~> 4.0.0' 

# See for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 

# Use jquery as the JavaScript library 
#gem 'jquery-rails' 

# Turbolinks makes following links in your web application faster. Read more: 
#gem 'turbolinks' 

# Build JSON APIs with ease. Read more: 
#gem 'jbuilder', '~> 1.2' 

group :doc do 
    # bundle exec rake doc:rails generates the API under doc/api. 
    gem 'sdoc', require: false 
end 

# Use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Use Capistrano for deployment 
# gem 'capistrano', group: :development 

# Use debugger 
# gem 'debugger', group: [:development, :test] 

database.ymlの:

# MySQL. Versions 4.1 and 5.0 are recommended. 
# 
# Install the MYSQL driver 
# gem install mysql2 
# 
# Ensure the MySQL gem is defined in your Gemfile 
# gem 'mysql2' 
# 
# And be sure to use new-style password hashing: 
# 
development: 
    adapter: mysql2 
    encoding: utf8 
    database: #simple_cms_development 
    pool: 5 
    username: root 
    password: mypass 
    socket: /var/run/mysqld/mysqld.sock 

# 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: 
    adapter: mysql2 
    encoding: utf8 
    database: simple_cms_test 
    pool: 5 
    username: root 
    password: mypass 
    socket: /var/run/mysqld/mysqld.sock 

production: 
    adapter: mysql2 
    encoding: utf8 
    database: simple_cms_production 
    pool: 5 
    username: root 
    password: mypass 
    socket: /var/run/mysqld/mysqld.sock 
+0

投稿してくださいあなたのgemファイルとあなたの 'appname/config/database.yml'ファイル。 – MarsAtomic

+0

これはエラーの原因ではありませんが、使用しているRubyのバージョンは使用しているレールのバージョンと互換性がありません。 –

+0

mysqlを起動しましたか? – uzaif

答えて

0

ここのような行の先頭に '#' を入れてみてください:
#database:simple_cms_development

関連する問題