0

Working on learning Ruby and RoR over here. Got Ruby, Brew, Bundle and Rails installed. Created a local Rails project on my Mac and was ready to start the local rails server.

But I get an error and I'm just too new to figure out what I should do. Unfortunately the tutorial (which has been easy to follow up to this point) doesn't address what to do next.

Any suggestions would be extremely appreciated.

Here's the error:

... hello_world_ % rails server
Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0
bin/rails:3:in `require_relative': cannot load such file -- /Users/.../Dropbox/Mac/Documents/RailsProjects/hello_world_/config/boot (LoadError)
    from bin/rails:3:in `<main>'
Hans
  • 1
  • Welcome to SO! Well done on formatting your question. – Chiperific Oct 23 '22 at 12:38
  • Also, doesn't putting this code in a Dropbox folder cause issues? Git and sites like Github or Bitbucket are designed for this specifically, Dropbox isn't. – Chiperific Oct 23 '22 at 13:32
  • I think [this SO post](https://stackoverflow.com/questions/38797458/ignoring-gem-because-its-extensions-are-not-built) probably has your answer. – Chiperific Oct 23 '22 at 13:34
  • Dropbox embeds itself so deeply that it acts like any other directory structure. It basically becomes the top of the folder hierarchy on the local machine somehow, or at least operates that way. E.g., if I go to users/Documents directly, I see RailsProjects/hello_world (this Rails pjt I'm trying to use). No sign of Dropbox. – Hans Oct 23 '22 at 16:17
  • PS: But if I go to that Rails project in terminal and look at the address in the tab, Terminal shows that same structure as being within Dropbox somehow. I'm not sure why/how. Black magic possibly. – Hans Oct 23 '22 at 16:23

2 Answers2

1

Try creating the empty file manually with name boot.rb in config folder and try running the server. if the build fails just add these line of codes in config/boot.rb file

ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
0

In this case, the error is giving you a suggestion. Run this command in your terminal:

gem pristine racc -v 1.6.0
Chiperific
  • 4,428
  • 3
  • 21
  • 41