1
votes

I am following a ruby tutorial and when running 'rails s' am getting this error.

This was working fine before but now I can't start the rails server now. It seems like I have changed something in rails.

Booting WEBrick Rails 4.1.5 application starting in development on Run rails server -h for more startup options Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0 0.1 (--binding option) Ctrl-C to shutdown server xiting :/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/act ve_support/dependencies.rb:247:in require': cannot load such file -- syslogger (LoadError) from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport- .1.5/lib/active_support/dependencies.rb:247:inblock in require' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport- .1.5/lib/active_support/dependencies.rb:232:in load_dependency' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport- .1.5/lib/active_support/dependencies.rb:247:inrequire' from c:/Sites/omrails/config/environment.rb:8:in <top (required)>' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport- .1.5/lib/active_support/dependencies.rb:247:inrequire' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport- .1.5/lib/active_support/dependencies.rb:247:in block in require' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport- .1.5/lib/active_support/dependencies.rb:232:inload_dependency' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport- .1.5/lib/active_support/dependencies.rb:247:in require' from c:/Sites/omrails/config.ru:3:inblock in ' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/builder.rb:55:in instance_eval' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/builder.rb:55:ininitialize' from c:/Sites/omrails/config.ru:in new' from c:/Sites/omrails/config.ru:in' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/builder.rb:49:in eval' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/builder.rb:49:innew_from_string' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/builder.rb:40:in parse_file' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/server.rb:277:inbuild_app_and_options_from_config' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/server.rb:199:in app' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands/server.rb:50:inapp' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib rack/server.rb:314:in wrapped_app' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands/server.rb:130:inlog_to_stdout' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands/server.rb:67:in start' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands/commands_tasks.rb:81:inblock in server' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands/commands_tasks.rb:76:in tap' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands/commands_tasks.rb:76:inserver' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands/commands_tasks.rb:40:in run_command!' from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.5 lib/rails/commands.rb:17:in' from bin/rails:4:in require' from bin/rails:4:in'

**** Edit I tried to reinstall rails and now i have this error when starting rails server****

C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/de pendencies.rb:247:in require': cannot load such file -- sqlite3/sqlite3_native (LoadError) from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/acti ve_support/dependencies.rb:247:inblock in require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/acti ve_support/dependencies.rb:232:in load_dependency' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/acti ve_support/dependencies.rb:247:inrequire' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/li b/sqlite3.rb:6:in rescue in <top (required)>' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/li b/sqlite3.rb:2:in' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/ru ntime.rb:76:in require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/ru ntime.rb:76:inblock (2 levels) in require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/ru ntime.rb:72:in each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/ru ntime.rb:72:inblock in require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/ru ntime.rb:61:in each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/ru ntime.rb:61:inrequire' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler.rb :133:in require' from C:/Sites/omrails/config/application.rb:7:in' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/com mands/commands_tasks.rb:79:in require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/com mands/commands_tasks.rb:79:inblock in server' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/com mands/commands_tasks.rb:76:in tap' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/com mands/commands_tasks.rb:76:inserver' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/com mands/commands_tasks.rb:40:in run_command!' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.5/lib/rails/com mands.rb:17:in' from bin/rails:4:in require' from bin/rails:4:in'

1
For the new one after reinstall have you installed sqlite3? Looks like in your config.rb you set your db to sqliteNiko Adrianus Yuwono
yes i installed sqlite3 during the reinstall. I dont have a config.rb file what i have is config.ruAbhilash
nayoso meant probably database.yml. Did sqlite3 also compile successfully? It is a native gem that requires a compilation step. I do not develop on windows since years, but I remember it was a pain in the *** to get it compiled...The Ancient

1 Answers

1
votes

Where is the problem?

You're using the sqlite3 database for Rails on Windows!

I also got similar error warnings on my Windows 10!


Where is the error located?

The errors are in your gemspec folder!

Find your gemspec folder on your Windows 8: C:\Ruby21\lib\ruby\gems\2.1.0\specifications.

If you're using RailsInstaller go under: C:\RailsInstaller\Ruby2.1.0\lib\ruby\gems\2.1.0\specifications!


Repair it manually

You should adjust according with your Rubygem path and sqlite3 version.

Edit the files for

  • sqlite3-4.1.5.gemspec
  • activesupport-4.1.5.gemspec
  • rack-4.1.5.gemspec
  • railties-4.1.5.gemspec

and look for the following line:

s.require_paths=["lib"]

change it to:

s.require_paths= ["lib/sqlite3_native"]

Helpful links

Your question is similar to cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails!