Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 5, Carrierwave. Could not find generator 'uploader'

I have installed Carrierwave successfully. I can see it from the terminal: gem list carrierwave =>

*** LOCAL GEMS ***

carrierwave (1.0.0.rc)

But I still can not generate uploader... If I run rails g uploader Picture in terminal I get Could not find generator 'uploader'.

My only thought is that there might be some conflicts between gems. Here is the gem file:

source 'https://rubygems.org'

gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
gem 'puma', '~> 3.0'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'autoprefixer-rails', '6.4.0.3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'carrierwave', '~> 0.11.2'
gem 'mini_magick', '~> 4.3'

group :development, :test do
  gem 'byebug', platform: :mri
  gem 'sqlite3'
end

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

group :development do
  gem 'web-console'
  gem 'listen', '~> 3.0.5'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'devise', '~> 4.2'
gem 'omniauth-facebook'
gem 'omniauth-google'

Any ideas? Many thanks!

like image 514
Julius Dzidzevičius Avatar asked Dec 14 '22 02:12

Julius Dzidzevičius


2 Answers

Issue might be of spring cache. Write following command and try again

  bin/spring stop

thats it :)

like image 92
Saumya Mehta Avatar answered Dec 31 '22 01:12

Saumya Mehta


You're not using the stable version of the gem. Switch to 0.11.2

Update:

And install the gem manually too. `gem install carrierwave'

=> https://github.com/carrierwaveuploader/carrierwave/issues/219

like image 33
gdurelle Avatar answered Dec 31 '22 01:12

gdurelle