Setup Errors for Rails on MacOS 10.14 Mojave
Hello everyone!
I have already installed Ruby Environment, but each time I try to install Rails on MacOS, it's giving me the following errors:
Jerricas-MacBook-Pro:test_app jerricajohnson$ rails -v
Traceback (most recent call last):
15: from bin/rails:3:in <main>'
load'
14: from bin/rails:3:in
13: from /Users/jerricajohnson/test_app/bin/spring:15:in <top (required)>'
require'
12: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in
11: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in require'
'
10: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in
9: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in load'
'
8: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/bin/spring:49:in
7: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client.rb:30:in run'
call'
6: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in
5: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in call'
load'
4: from /Users/jerricajohnson/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in
3: from /Users/jerricajohnson/test_app/bin/rails:8:in <top (required)>'
require_relative'
2: from /Users/jerricajohnson/test_app/bin/rails:8:in
1: from /Users/jerricajohnson/test_app/config/boot.rb:4:in <top (required)>'
require': cannot load such file -- bootsnap/setup (LoadError)
/Users/jerricajohnson/test_app/config/boot.rb:4:in
Does anyone know what this means? I'm pretty new to the coding game.
Hey Jerrica,
Looks like maybe you're just missing this line in your Gemfile:
gem 'bootsnap', require: false
Try adding that and running bundle
afterwards to install it.
It's basically just trying to load bootsnap but it can't find it. Bootsnap is a tool to make loading Rails faster. https://github.com/Shopify/bootsnap#how-does-this-work
Hello! Thanks for the response. I'm inputting that into the terminal. It keeps saying 'unknown command bootsnap'.