Rails Server Gem Load Error - SQlite3

Ruecktenwald

Let me start out with, I have searched and read all questions asked similar to my issue and have tried all suggestions. Here's some of the technology I'm using, if it helps:

  • Initially, High Sierra on an early 2015 macbook(now upgraded to Mojave)
  • ruby 2.5.1
  • rails -5.0.0
  • sublime3
  • iterm2
  • chrome + safari

Following Pragmatic studios Rails 1 course I installed ruby 2.5.1 and rails 5.0.0 new bundle check and all dependencies are satisfied bundle install etc...

So now I have a new rails app setup and I try rails s the Puma server runs the app seemingly without issue but when I try and load the browser localhost3000 I get an error:

Gem::LoadError
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

When I refresh the page while running the server I get this error:

ActiveRecord::ConnectionNotEstablished
No connection pool with id primary found.

I have checked gem file and sqlite3 is there. I have re-installed sqlite3. I have done bundle exec rails server. I have uninstalled sqlite3 and reinstalled. I have deleted the Gemfile.lock file and did bundle install(and exec). I have tried every suggestion I could find online.

So now I thought, well maybe my system is messed up and I could use an upgrade to Mojave.

So... I created a bootable drive deleted the HD and did a clean install.

Now running Mojave with the same apps listed above reinstalled.

So I run rails s - same sequence of errors!? Here's what I have in Gemfile and Gemfile.lock:

Gem file:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
#gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

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

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platform: :mri
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console'
  gem 'listen', '~> 3.0.5'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
----------

Gem Lock:

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.0.7.1)
      actionpack (= 5.0.7.1)
      nio4r (>= 1.2, < 3.0)
      websocket-driver (~> 0.6.1)
    actionmailer (5.0.7.1)
      actionpack (= 5.0.7.1)
      actionview (= 5.0.7.1)
      activejob (= 5.0.7.1)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.0.7.1)
      actionview (= 5.0.7.1)
      activesupport (= 5.0.7.1)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.0.7.1)
      activesupport (= 5.0.7.1)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.0.7.1)
      activesupport (= 5.0.7.1)
      globalid (>= 0.3.6)
    activemodel (5.0.7.1)
      activesupport (= 5.0.7.1)
    activerecord (5.0.7.1)
      activemodel (= 5.0.7.1)
      activesupport (= 5.0.7.1)
      arel (~> 7.0)
    activesupport (5.0.7.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    arel (7.1.4)
    bindex (0.5.0)
    builder (3.2.3)
    byebug (11.0.0)
    coffee-rails (4.2.2)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.1.4)
    crass (1.0.4)
    erubis (2.7.0)
    execjs (2.7.0)
    ffi (1.10.0)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    i18n (1.5.3)
      concurrent-ruby (~> 1.0)
    jbuilder (2.8.0)
      activesupport (>= 4.2.0)
      multi_json (>= 1.2)
    jquery-rails (4.3.3)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    listen (3.0.8)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    loofah (2.2.3)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    method_source (0.9.2)
    mini_mime (1.0.1)
    mini_portile2 (2.4.0)
    minitest (5.11.3)
    multi_json (1.13.1)
    nio4r (2.3.1)
    nokogiri (1.10.1)
      mini_portile2 (~> 2.4.0)
    puma (3.12.0)
    rack (2.0.6)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (5.0.7.1)
      actioncable (= 5.0.7.1)
      actionmailer (= 5.0.7.1)
      actionpack (= 5.0.7.1)
      actionview (= 5.0.7.1)
      activejob (= 5.0.7.1)
      activemodel (= 5.0.7.1)
      activerecord (= 5.0.7.1)
      activesupport (= 5.0.7.1)
      bundler (>= 1.3.0)
      railties (= 5.0.7.1)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.4)
      loofah (~> 2.2, >= 2.2.2)
    railties (5.0.7.1)
      actionpack (= 5.0.7.1)
      activesupport (= 5.0.7.1)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.3.2)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.0)
      ffi (~> 1.0)
    sass (3.7.3)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.0.7)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    spring (2.0.2)
      activesupport (>= 4.2)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sqlite3 (1.4.0)
    thor (0.20.3)
    thread_safe (0.3.6)
    tilt (2.0.9)
    turbolinks (5.2.0)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    uglifier (4.1.20)
      execjs (>= 0.3.0, < 3)
    web-console (3.7.0)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.3)

PLATFORMS
  ruby

DEPENDENCIES
  byebug
  coffee-rails (~> 4.2)
  jbuilder (~> 2.5)
  jquery-rails
  listen (~> 3.0.5)
  puma (~> 3.0)
  rails (~> 5.0.0)
  sass-rails (~> 5.0)
  spring
  spring-watcher-listen (~> 2.0.0)
  sqlite3
  turbolinks (~> 5)
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console

BUNDLED WITH
   1.16.6
---------
Ruecktenwald

Mike Clark from PragmaticStudio Solved this for me!

Ah, looks like it’s an issue with the sqlite3 v1.4.0 gem which was released on February 4. There’s a fix in the works:

https://github.com/rails/rails/issues/35153

In the meantime, you can fall back to v1.3.6 by adding that version to the “sqlite3” line in your Gemfile, like so:

gem "sqlite3", "~> 1.3.6”

Then make sure to “bundle install”.

Anyway, that solved the issue for me. I also found this helpful:

https://stackoverflow.com/questions/54527277/cant-activate-sqlite3-1-3-6-already-activated-sqlite3-1-4-0/54606137#54606137

Give that a try and see if it works for you.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Error installing sqlite3, Failed to build gem native extension

分類Dev

RailsサーバーのGemロードエラー-SQlite3

分類Dev

Association Error with Sorcery Gem in Rails

分類Dev

Rails:Twitter Omniauth gem 401 Unauthorized Error

分類Dev

There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)

分類Dev

SQLite3 query fails, the error does not

分類Dev

Carmen-Rails gem error undefined method 'country_code'

分類Dev

OS Sierraにアップグレードした後のRailsのセグメンテーションエラー、おそらくsqlite3 gemに関連

分類Dev

Rails 5 および MongoDB: データベース アダプターに「sqlite3」を指定しましたが、gem がロードされていません

分類Dev

Rails 4 SQLite3::ReadOnlyException: attempt to write a readonly database

分類Dev

Ruby on Rails create_table(SQlite3とPostgreSQL)

分類Dev

Rails 4 sql query interpretation with mysql or sqlite3

分類Dev

Ruby fog gem causing server not to run: cannot load such file -- xmlrpc/client (LoadError)

分類Dev

sqlite3 "OperationalError: near "(": syntax error" python

分類Dev

sqlite3 raised an error after running Airflow command line

分類Dev

sqlite3 error: You did not supply a value for binding 1

分類Dev

configure error: Package requirements (sqlite3 > 3.7.4) were not met

分類Dev

rake figaro:heroku is returning an error with sqlite3

分類Dev

Capybara error ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked

分類Dev

Vimeo Gem API Rails

分類Dev

Ruby on Rails CanCan Gem

分類Dev

Can't start Ruby On Rails Webbrick server using Mysql2 gem

分類Dev

Trying to install rails on xubuntu 14.04 ERROR: Failed to build gem native extension

分類Dev

Java system command to load sqlite3 db from file fails

分類Dev

MacでSqlite3を使用してRailsを実行するにはどうすればよいですか?「gemがロードされていません」というメッセージが表示されますが、Gemfileに含まれています

分類Dev

Explode() is giving server error, page can't load

分類Dev

Ubuntu "gem install rails" fails

分類Dev

Rails draper gem with Ajax / JS

分類Dev

利用規約 Gem for Rails

Related 関連記事

  1. 1

    Error installing sqlite3, Failed to build gem native extension

  2. 2

    RailsサーバーのGemロードエラー-SQlite3

  3. 3

    Association Error with Sorcery Gem in Rails

  4. 4

    Rails:Twitter Omniauth gem 401 Unauthorized Error

  5. 5

    There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)

  6. 6

    SQLite3 query fails, the error does not

  7. 7

    Carmen-Rails gem error undefined method 'country_code'

  8. 8

    OS Sierraにアップグレードした後のRailsのセグメンテーションエラー、おそらくsqlite3 gemに関連

  9. 9

    Rails 5 および MongoDB: データベース アダプターに「sqlite3」を指定しましたが、gem がロードされていません

  10. 10

    Rails 4 SQLite3::ReadOnlyException: attempt to write a readonly database

  11. 11

    Ruby on Rails create_table(SQlite3とPostgreSQL)

  12. 12

    Rails 4 sql query interpretation with mysql or sqlite3

  13. 13

    Ruby fog gem causing server not to run: cannot load such file -- xmlrpc/client (LoadError)

  14. 14

    sqlite3 "OperationalError: near "(": syntax error" python

  15. 15

    sqlite3 raised an error after running Airflow command line

  16. 16

    sqlite3 error: You did not supply a value for binding 1

  17. 17

    configure error: Package requirements (sqlite3 > 3.7.4) were not met

  18. 18

    rake figaro:heroku is returning an error with sqlite3

  19. 19

    Capybara error ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked

  20. 20

    Vimeo Gem API Rails

  21. 21

    Ruby on Rails CanCan Gem

  22. 22

    Can't start Ruby On Rails Webbrick server using Mysql2 gem

  23. 23

    Trying to install rails on xubuntu 14.04 ERROR: Failed to build gem native extension

  24. 24

    Java system command to load sqlite3 db from file fails

  25. 25

    MacでSqlite3を使用してRailsを実行するにはどうすればよいですか?「gemがロードされていません」というメッセージが表示されますが、Gemfileに含まれています

  26. 26

    Explode() is giving server error, page can't load

  27. 27

    Ubuntu "gem install rails" fails

  28. 28

    Rails draper gem with Ajax / JS

  29. 29

    利用規約 Gem for Rails

ホットタグ

アーカイブ