Carrierwave Issue

I installed carrierwave, but Localhost:3000 says "NameError in RestaurantsController" "#index uninitialized constant CarrierWave" Extracted source (around line #3): # encoding: utf-8 class ImageUploader < CarrierWave::Uploader::Base # Include RMagick or MiniMagick support: # include CarrierWave::RMagick in image_uploader.rb

Posted over 5 years ago by TL
Posted over 5 years ago by TL

I restarted the server, but it is giving me the same "NameError in RestaurantsController#index / uninitialized constant CarrierWave" message.

1
Posted over 5 years ago by TL

I think that I solved it. I added require 'carrierwave' in the config>application.rb file, beneath require 'rails/all', saved it and
refreshed the localhost:3000 page. It shows the yelpdemo page with the choose file, and create restaurant buttons.

0
Posted over 5 years ago by Alex Yang

Did you make sure to install carrierwave by adding it to your Gemfile?

0
Posted over 5 years ago by TL

I added gem 'carrierwave' beneath gem 'pg', group: :production

0
Posted over 5 years ago by Alex Yang

Did you run 'bundle install' to install the carrierwave gem for your app?

0