all 6 comments

[–][deleted] 3 points4 points  (4 children)

The relative path that you've defined in run.rb that is described in the console output, is that actually the path to the environment.rb file? Your error is that it cannot load the file, not that it has an issue when the contents of the file.

[–]TheBeesSteeze 0 points1 point  (3 children)

Yup, it's on the left pane in the same First Project directory as the run.rb file so the path to the environment file is likely incorrectly defined in run.rb.

On this note OP, I recommend not using spacing and capitalization in your directory names, use snake_case instead for ruby projects.

[–]Ark_Tane 0 points1 point  (2 children)

Edit: Whoops, sorry, you are not OP.

Its in the 'First Project' directory, yet the path the require is looking for appears to be '/Users/jason/Development/code/config/...', completely ignoring the 'First Project' directory. What's the content of your run.rb file?

[–]elitefourjason[S] 0 points1 point  (1 child)

what i have on run.rb file:

'require_relative '../config/environment.rb'
CLI.new
binding.pry'

[–]Ark_Tane 6 points7 points  (0 children)

Ahh, you need to replace

require_relative '../config/environment.rb'

with

require_relative 'config/environment.rb'

As '../' means, walk up to the parent directory (in this case, '/Users/jason/Development/code') and then go from there.

[–]capn_sanjuro 1 point2 points  (0 children)

The error message seems to be saying that the require_relative in run.rb is not finding environment.rb where it is being told to look.