What to do if the Rails server can't start

Introduction

Nice to meet you. I bought a MacBook Pro a week ago and am studying at Progate to change jobs as an inexperienced engineer. Immediately, I got stuck when building the environment for Ruby on Rails.

rails s does not start

Just install Atom, Homebrew, rbenv, Rails as Progate tells you, and then build a server locally. But,

rails s

When you enter

Could not find gem 'rails (~> 6.0.3, >= 6.0.3.4)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

What the hell. For the time being

bundle install

Since it says to enter, I will try it.

An error occurred while installing bindex (0.8.1), and Bundler
cannot continue.
Make sure that `gem install bindex -v '0.8.1' --source 'https://rubygems.org/'`
succeeds before bundling.

I am coming to the hearts of beginners. A few hours to ask Google teacher,

sudo gem install bindex -v '0.8.1'

It seems that you can now enter the password and install. Now, when you run bundle install again,

An error occurred while installing msgpack (1.3.3), and Bundler
cannot continue.
Make sure that `gem install msgpack -v '1.3.3' --source 'https://rubygems.org/'`
succeeds before bundling.

Is it again? But in the same way

sudo gem install msgpack -v '1.3.3'

I will install it with. After that, I repeated the work of running bundle install to install what was missing, and finally rails s was able to run.

in conclusion

I hope it helps someone like me who has a lottery.

Recommended Posts

What to do if the Rails server can't start
What to do if rails server can't be stopped
What to do if you can't use the rails command
What to do if the server tomcat dies
What to do if the rails server doesn't run out on AWS cloud9
What to do if the Rails page doesn't appear in Rails tutorial 1.3.2
What to do if Cloud9 is full in the Rails tutorial
[Rails] What to do if you can't get parameters with form_with
What to do if you get an "A server is already running." Error when you try to start the rails server
[Rails] What to do if you can't get an error message with the errors method
What to do if you can't install the plugin from the Eclipse marketplace
What to do if the debug gem installation fails
What to do if you can't activate the select box created by bootstrap-select
What to do if you can't bundle update and bundle install after installing Ruby 3.0.0 in the Rails tutorial
# What to do if you accidentally do rails db: migrate: drop
What to do if the adb command cannot be executed
What to do if the update does not take effect after deploying Rails AWS
What to do if you can't get the text of an element in Selenium
What to do if you can't find your API key after deploying to Rails heroku
What to do if validation doesn't work with the update action
[Rails] What to do if data is not registered in DB
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
What to do if the Eclipse Maven dependency Jar is wrong
What to do if you install Ubuntu
What to do if you forget the root password in CentOS7
What to do if you cannot roll back the migration (UnknownMigrationVersionError)
[Note] What to do if bundle install in Chapter 3 of the rails tutorial is not possible
What to do if the app is not created with the latest Rails version installed when rails new
What to do if you get an error during rails db: reset
What to do if the background image is not applied after deployment
What to do if the prefix c is not bound in JSP
What to do if you don't like the code generated by swagger-codegen-cli
When the server fails to start in Eclipse
What to do if you push incorrect information
What to do if mvn archetype: generate fails
What to do if the image posted by refile disappears after setting a 404 error page in Rails
[Rails / Docker] What to do if access is denied by the browser (localhost: 3000) after adding a gem
Rails server doesn't start.
What to do if you get the error message unrecognized selector send to instance "***"
What to do if the changes are not reflected in the jar manifest file
What to do when rails db: seed does not reflect in the database
[Grails] Error occurred running What to do when the Grails CLI does not start
[Swift] What to do if the app icon is set but not reflected
What to do if you get To install the missing version, run `gem install bundler: 2.1.4`
What to do if ffi installation fails when launching an application in Rails
What to do when The SSL certificate has expired
What to do if ClassNotFoundException occurs when starting Tomcat
What to do if TextToSpeech doesn't work on Android 11
What should I do to reload the updated Dockerfile?
What to do if you accidentally create a model
What to do when rails creates a 〇〇 2.rb file
What to do if an ActionController :: UnknownFormat error occurs
What to do if password authentication fails in Docker/Postgres
What to do about "A server is already running ..." that happened without turning off the rails server in the terminal
When the server does not start with rails s
What to do if you get the error Couldn't find Item without an ID
What to do if the JSONHint annotation does not work with lombok and JSONIC
What to do if the breakpoint is shaded and does not stop during debugging
What to do if you cannot execute with the command "Java package name / class name"
How to terminate rails server
What to do if you get an error saying "Could not find a JavaScript runtime." When starting rails server