El Capitan upgrade: Library not loaded: /usr/local/lib/libmysqlclient.18.dylib
I was getting the same issue earlier on, I fixed it by reinstalling the gem mysql2.
I was getting the same issue earlier on, I fixed it by reinstalling the gem mysql2.
The solution is running the code below to start your server: rails s -b 0.0.0.0 I found this solution from another post about same problem. The answerer said ‘You’ll want to make sure that the server is binded to 0.0.0.0 so that all interfaces can access it.” I hope this post helps people who encounter … Read more
Rails 4.2 now binds to 127.0.0.1 by default and not 0.0.0.0. Start the server using bin/rails server -b 0.0.0.0 and that should sort it.
Note that in Rails 5 and in Rails 6 you may need to mark the corresponding association as optional if it’s 1:n (belongs_to), as the default was changed: belongs_to :author, optional: true This is the corresponding Changeset. To use the old behavior across your application, you can also set: Rails.application.config.active_record.belongs_to_required_by_default = false in config/initializers/new_framework_defaults.rb The … Read more
I encountered the same problem and it seems to be a caching issue with Spring, a process which handles preloading your app. It’s used for the web server as well as the console and Rake tasks. Stopping Spring with bin/spring stop will force Spring to load your app fresh. Now running rails console and inspecting … Read more
I’m having the same issue here and I found today a better solution. Just append this code to your config/boot.rb and it should work with vagrant. require ‘rails/commands/server’ module Rails class Server def default_options super.merge(Host: ‘0.0.0.0’, Port: 3000) end end end ps: Its based on: this answer
Just do: gem ‘mysql2’, ‘~> 0.3.18’ this gem works with rails version 4.x.x if install gem ‘mysql2’, ‘~> 0.4.0’ it produces gem load error and causes compatibility issues