T
T
TopClone2016-07-22 12:15:06
Ruby on Rails
TopClone, 2016-07-22 12:15:06

How to fix Rails server startup?

I went into the directory with the previously created Blog project . After typing the following commands
rails server
ruby ​​bin\rails server
outputs this

C:/Ruby/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sqlite3.rb:6:in
`require': cannot load such file -- sqlite3/sqlite3_native ( LoadError)
from C:/Ruby/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sql
ite3.rb:6:in `rescue in '
from C:/Ruby/ lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sql
ite3.rb:2:in `'
from C:/Ruby/lib/ruby/gems/2.3.0/ gems/bundler-1.12.5/lib/bundler/runtime
.rb:86:in `require'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/ runtime
.rb:86:in `block (2 levels) in require'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime
.rb:81: in `each'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime
.rb:81:in `block in require'
from C:/Ruby/lib/ruby/ gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime
.rb:70:in `each'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.12. 5/lib/bundler/runtime
.rb:70:in `require'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:
in ` require'
from c:/Rubytut/Blog/config/application.rb:7:in `'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands /
commands_tasks.rb:88:in `require'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/
commands_tasks.rb:88:in `block in server'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/
commands_tasks.rb:85:in ` tap'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/
commands_tasks.rb:85:in `server'
from C:/Ruby/lib/ ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/
commands_tasks.rb:49:in `run_command!'
from C:/Ruby/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands.
rb:18:in `'
from bin/rails:4:in `require'
from bin/rails:4:in `'

Please tell me: what to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2016-07-22
@TopClone

Add the
gem 'sqlite3' line to the Gemfile
to check if the gem sqlite3 and the dll itself are installed.
gem list sqlite3
should show the installed gem version.
You can check whether it is installed correctly by running.
If it does not display 1, then the problem may be in the absence of dll.
You can also try installing the sqlite3-static gem.
Before starting the Rails server, you need to check if everything is installed using
bundle check.

E
Eugene Burmakin, 2016-07-22
@Freika

Move the hosts file from C:/Windows/system32/etc/hosts to /etc/hosts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question