Search code examples
ruby-on-railsrubyactiverecorddelayed-job

Could not find generator 'delayed_job:active_record


I'm trying to install this gem in rails app: https://github.com/collectiveidea/delayed_job

As instructed, I added this to my gem file, and ran bundle install:

gem 'delayed_job_active_record'

Then, upon running the command

rails g delayed_job:active_record

I get

Running via Spring preloader in process 4971
Expected string default value for '--jbuilder'; got true (boolean)
Expected boolean default value for '--markerb'; got :erb (string)
[WARNING] Please install gem 'therubyracer' to use Less.
Expected string default value for '--rc'; got false (boolean)
Expected string default value for '--helper'; got true (boolean)
Expected string default value for '--assets'; got true (boolean)
Expected string default value for '--rc'; got false (boolean)
Could not find generator 'delayed_job:active_record'. Maybe you meant 'devise:controllers' or 'active_record:model' or 'devise:form_for'

What could be causing this?

Here is my gemfile for further reference:

source 'https://rubygems.org'

ruby "2.1.2"

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'

# gem 'puma'
gem "passenger"

# Use sqlite3 as the database for Active Record
group :development, :test do
  gem 'sqlite3'
end

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

#Other 
gem 'twitter'
gem 'omniauth-twitter', :git => 'https://github.com/arunagw/omniauth-twitter.git'
gem "twitter-bootstrap-rails"
gem 'devise'
gem 'simple_form'
gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
gem 'delayed_job_active_record'

#Pagination
gem 'will_paginate', '~> 3.0.6'
gem 'will_paginate-bootstrap'

#Cleaning up logs a bit
gem 'quiet_assets', group: :production

#Dealing w/ phone number input
gem 'phony_rails'

#Dealing w/ email inputs
gem 'email_validator'

#Dealing w/ dates
gem 'chronic'

#Dealing w/ locations
gem 'geocoder'
gem 'geokit-rails'

gem 'simple_form_extension'

#Error alerts
gem 'rollbar'

#For dashboard
gem "chartkick"
gem 'groupdate'

gem 'order_as_specified'

gem 'sendgrid-ruby'


#For billing
gem 'stripe'

gem 'fuzzy_match'
gem 'amatch'


#For media files
gem 'paperclip', :git=> 'https://github.com/thoughtbot/paperclip', :ref => '523bd46c768226893f23889079a7aa9c73b57d68'
gem 'aws-sdk', '< 2.0'


gem 'quiet_assets'

#Other 
gem 'httparty'
# gem 'watir'
# gem "watir-rails"
gem 'mechanize'

gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
#gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'spring',        group: :development


gem 'redactor-rails', github: 'glyph-fr/redactor-rails'

Solution

  • If you're using spring you can find that functionality from new gems is not always available.

    In this case you should do spring stop first.

    spring stop
    rails g delayed_job:active_record