2013-05-11 3 views
2

Я только что установил Ruby193 и Ruby200, и я пытаюсь загрузить сервер после создания нового приложения, но я получаю сообщение об ошибке ниже.Ошибка при запуске сервера с сервером rails, ошибка sqllite

=> Booting WEBrick 
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
Exiting 
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integ 
ration.rb:214:in `block in replace_gem': Please install the sqlite3 adapter: `ge 
m install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add 
it to Gemfile.) (LoadError) 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/connection_adapters/sqlite3_adapter.rb:3:in `<top (required)>' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/dependencies.rb:251:in `require' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/dependencies.rb:251:in `block in require' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/dependencies.rb:236:in `load_dependency' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/dependencies.rb:251:in `require' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/connection_adapters/abstract/connection_specification.rb:50:in `resol 
ve_hash_connection' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/connection_adapters/abstract/connection_specification.rb:41:in `resol 
ve_string_connection' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/connection_adapters/abstract/connection_specification.rb:25:in `spec' 

    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/connection_adapters/abstract/connection_specification.rb:130:in `esta 
blish_connection' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/lazy_load_hooks.rb:36:in `instance_eval' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/lazy_load_hooks.rb:36:in `execute_hook' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/lazy_load_hooks.rb:43:in `block in run_load_hooks' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/lazy_load_hooks.rb:42:in `each' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac 
tive_support/lazy_load_hooks.rb:42:in `run_load_hooks' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/base.rb:720:in `<top (required)>' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act 
ive_record/railtie.rb:88:in `block in <class:Railtie>' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i 
nitializable.rb:30:in `instance_exec' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i 
nitializable.rb:30:in `run' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i 
nitializable.rb:55:in `block in run_initializers' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i 
nitializable.rb:54:in `each' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i 
nitializable.rb:54:in `run_initializers' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/a 
pplication.rb:136:in `initialize!' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/r 
ailtie/configurable.rb:30:in `method_missing' 
    from C:/Workspace/RailsTest/app_name/config/environment.rb:5:in `<top (r 
equired)>' 
    from C:/Workspace/RailsTest/app_name/config.ru:3:in `require' 
    from C:/Workspace/RailsTest/app_name/config.ru:3:in `block in <main>' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder 
.rb:51:in `instance_eval' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder 
.rb:51:in `initialize' 
    from C:/Workspace/RailsTest/app_name/config.ru:in `new' 
    from C:/Workspace/RailsTest/app_name/config.ru:in `<main>' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder 
.rb:40:in `eval' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder 
.rb:40:in `parse_file' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server. 
rb:200:in `app' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c 
ommands/server.rb:46:in `app' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server. 
rb:304:in `wrapped_app' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server. 
rb:254:in `start' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c 
ommands/server.rb:70:in `start' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c 
ommands.rb:55:in `block in <top (required)>' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c 
ommands.rb:50:in `tap' 
    from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c 
ommands.rb:50:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

Я заменил sqlite3 драгоценный камень с драгоценным камнем «sqlite3», «~> 1.3.0» и бегал расслоение установить, но он ничего не сделал. Я также попытался установить альтернативы они предлагают по ошибке, но он выдает ошибку, а

ERROR: Could not find a valid gem 'activerecord-sqlite3-adapter' (>= 0) in any 
repository 
ERROR: Possible alternatives: activerecord-jdbcsqlite3-adapter, activerecord-sq 
lserver-adapter, activerecord-bq-adapter, activerecord-simpledb-adapter, activer 
ecord-mysql2-adapter 

Кто-нибудь знает, как это исправить?

Gemfile является

source 'https://rubygems.org' 

gem 'rails', '3.2.13' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3', '~> 1.3.0' 


# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
    # gem 'therubyracer', :platforms => :ruby 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

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

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

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

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'debugger' 

Bundle Показать дает Gems включены в пачке:

  • ActionMailer (3.2.13)
  • actionpack (3.2.13)
  • ActiveModel (3,2 .13)
  • activerecord (3.2.13)
  • activeresource (3.2.13)
  • ActiveSupport (3.2.13)
  • AREL (3.0.2)
  • строитель (3.0.4)
  • пакетирования (1.3.5)
  • кофе-рельсы (3.2.2)
  • кофе-скрипт (2.2.0)
  • кофе-скрипт-источник (1.6.2)
  • erubis (2.7.0)
  • execjs (1.4.0)
  • поход (1.2.2)
  • i18n (0.6.1)
  • путешествие (1.0.4)
  • JQuery-рельсы (2.2.1)
  • JSON (1.7.7)
  • почта (2.5.3)
  • MIME-типа (1.23)
  • multi_json (1.7.3)
  • полиглотом (0.3.3)
  • стойки (1.4.5)
  • стойку кэш (1.2)
  • стойку SSL (1.3.3)
  • стойку испытаний (0.6.2)
  • рельсы (3.2.13)
  • Railties (3.2.13)
  • рейк (10.0.4)
  • RDoc (3.12.2)
  • Сасс (3.2.9)
  • SASS рельсы (3.2.6)
  • звездочки (2.2.2)
  • Thor (0.18.1)
  • наклона (1.4.1)
  • Treetop (1.4.12)
  • tzinfo (0.3.37)
  • uglifier (2.1.0)

database.yml файл

# SQLite version 3.x 
# gem install sqlite3 
# 
# Ensure the SQLite 3 gem is defined in your Gemfile 
# gem 'sqlite3' 
development: 
    adapter: sqlite3 
    database: db/development.sqlite3 
    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: 
    adapter: sqlite3 
    database: db/test.sqlite3 
    pool: 5 
    timeout: 5000 

production: 
    adapter: sqlite3 
    database: db/production.sqlite3 
    pool: 5 
    timeout: 5000 
+0

Можете ли вы показать нам свой gemfile? – Pigueiras

+0

Я добавил там файл gem –

+0

как выглядит ваш database.yml? Можете ли вы опубликовать свой «пакетный показ» – Mattherick

ответ

0

Это, как я решить мою проблему.

Я переустановил рельсы, рубин, декит, используя rails installer. Прекрасно работает.

Смежные вопросы