I am new to Rails and programming in general. I built an app by following a tutorial on YouTube. I got the whole thing done, then started fiddling with Ruby and Rails versions. Maybe a mistake.... Anyway, I can no longer get the Rails S command to work. Pasted below is the error I am getting. I welcome any suggestions you might have.
tom@linux:~/apps/BookReview$ rails s
=> Booting Puma
=> Rails 5.2.0 application starting in development
=> Run rails server -h
for more startup options
Exiting
/home/tom/apps/BookReview/config/environments/development.rb:3:in block in <top (required)>': uninitialized constant Paperclip (NameError)
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/railtie.rb:216:in
instance_eval'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/railtie.rb:216:in configure'
from /home/tom/apps/BookReview/config/environments/development.rb:1:in
'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/engine.rb:602:in block (2 levels) in <class:Engine>'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/engine.rb:601:in
each'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/engine.rb:601:in block in <class:Engine>'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/initializable.rb:32:in
instance_exec'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/initializable.rb:32:in run'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/initializable.rb:61:in
block in run_initializers'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in
block (2 levels) in each_strongly_connected_component'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in
each_strongly_connected_component_from'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:421:in block in each_strongly_connected_component_from'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/initializable.rb:50:in
each'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/initializable.rb:50:in tsort_each_child'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:415:in
call'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:415:in each_strongly_connected_component_from'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in
block in each_strongly_connected_component'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in each'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in
call'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in
tsort_each'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in tsort_each'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/initializable.rb:60:in
run_initializers'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/application.rb:361:in initialize!'
from /home/tom/apps/BookReview/config/environment.rb:5:in
'
from config.ru:3:in require_relative'
from config.ru:3:in
block in '
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in instance_eval'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in
initialize'
from config.ru:in new'
from config.ru:in
'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in eval'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in
new_from_string'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in parse_file'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/server.rb:319:in
build_app_and_options_from_config'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/server.rb:219:in app'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:27:in
app'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/server.rb:354:in wrapped_app'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:89:in
log_to_stdout'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:51:in start'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:147:in
block in perform'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in tap'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in
perform'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in
invoke_command'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in
perform'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/command.rb:46:in invoke'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands.rb:18:in
'
from /home/tom/apps/BookReview/bin/rails:9:in require'
from /home/tom/apps/BookReview/bin/rails:9:in
'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in load'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in
call'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in call'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.2/lib/spring/client.rb:30:in
run'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.2/bin/spring:49:in <top (required)>'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in
load'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in <top (required)>'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in
require'
from /home/tom/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /home/tom/apps/BookReview/bin/spring:15:in
'
from bin/rails:3:in load'
from bin/rails:3:in
'
bundle install
after adding Paperclip to yourGemfile
? – Brian KungActiveStorage
instead of Paperclip if you are on Rails 5.2+, as Paperclip is deprecated: robots.thoughtbot.com/closing-the-trombone – Brian Kung