Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `new' for Resque:Module #1175

Closed
wlodi83 opened this issue Feb 6, 2014 · 18 comments
Closed

undefined method `new' for Resque:Module #1175

wlodi83 opened this issue Feb 6, 2014 · 18 comments

Comments

@wlodi83
Copy link

wlodi83 commented Feb 6, 2014

Hi,

I am using Rails 4.0.2 and ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]

I have installed Resque::VERSION => "2.0.0.pre.1"

However when I try Resque.new in the console I am getting an error: undefined method `new' for Resque:Module

Could you let me know how to fix it?

@yaauie
Copy link
Member

yaauie commented Apr 11, 2014

If you could provide a backtrace for your exception, we could help.

My suspicion is that you're using a plugin for resque that isn't yet compatible with the 2.x version of resque, or you're calling Resque.new in your own code, which isn't a thing that can be done.

@avgerin0s
Copy link

@wlodi83 Also, it'd be helpful providing the Gemfile.lock too

@AshtonKem
Copy link

Gemfile

ruby "2.1.1"

source 'https://rubygems.org'

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

# Use postgres as the database for Active Record
gem 'pg'

gem 'devise'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
gem 'compass-rails'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# For validating date/datetime fields
gem 'validates_timeliness'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

# For file uploads.
gem "paperclip", "~> 4.1"

gem 'nokogiri', '~> 1.6.3.1'
gem "resque", "~> 2.0.0.pre.1", github: "resque/resque"

# For pulling events from 8coupon
gem 'whenever', :require => false
gem 'delayed_job_active_record'
gem 'daemons'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

group :development, :test do
  gem 'rspec-rails'
  gem 'factory_girl_rails'
  gem 'pry'
  gem 'pry-doc', '~> 0.6.0'
  gem 'method_source', '~> 0.8.2'
end

gem 'braintree'

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use puma as the app server
gem 'puma'

# Add in 12factor support for Heroku
gem 'rails_12factor', group: [:production, :staging]

# Elasticsearch
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
gem 'bonsai-elasticsearch-rails', group: [:production, :staging]
# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

# For barcodes
gem 'barby'
gem 'chunky_png'
gem 'gretel'

# For Secrets!
gem "econfig", require: "econfig/rails"
gem 'friendly_id', '~> 5.0.0'

Gemfile.lock

GIT
  remote: git://github.com/resque/resque.git
  revision: 63ed8b95c39c9c12dbc0dd68da02c2c638b31f1b
  specs:
    resque (2.0.0.pre.1)
      json
      mono_logger (~> 1.0)
      redis-namespace (>= 1.3.0)
      thor (~> 0.17)

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.0.4)
      actionpack (= 4.0.4)
      mail (~> 2.5.4)
    actionpack (4.0.4)
      activesupport (= 4.0.4)
      builder (~> 3.1.0)
      erubis (~> 2.7.0)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    activemodel (4.0.4)
      activesupport (= 4.0.4)
      builder (~> 3.1.0)
    activerecord (4.0.4)
      activemodel (= 4.0.4)
      activerecord-deprecated_finders (~> 1.0.2)
      activesupport (= 4.0.4)
      arel (~> 4.0.0)
    activerecord-deprecated_finders (1.0.3)
    activesupport (4.0.4)
      i18n (~> 0.6, >= 0.6.9)
      minitest (~> 4.2)
      multi_json (~> 1.3)
      thread_safe (~> 0.1)
      tzinfo (~> 0.3.37)
    arel (4.0.2)
    atomic (1.1.16)
    barby (0.5.1)
    bcrypt (3.1.7)
    bonsai-elasticsearch-rails (0.0.4)
    braintree (2.30.0)
      builder (>= 2.0.0)
    builder (3.1.4)
    chronic (0.10.2)
    chunky_png (1.3.1)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cocaine (0.5.4)
      climate_control (>= 0.0.3, < 1.0)
    coderay (1.1.0)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.7.0)
    compass (0.12.4)
      chunky_png (~> 1.2)
      fssm (>= 0.2.7)
      sass (~> 3.2.17)
    compass-rails (1.1.7)
      compass (>= 0.12.2)
      sprockets (<= 2.11.0)
    daemons (1.1.9)
    delayed_job (4.0.3)
      activesupport (>= 3.0, < 4.2)
    delayed_job_active_record (4.0.2)
      activerecord (>= 3.0, < 4.2)
      delayed_job (>= 3.0, < 4.1)
    devise (3.2.4)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    diff-lcs (1.2.5)
    econfig (1.0.1)
    elasticsearch (1.0.5)
      elasticsearch-api (= 1.0.5)
      elasticsearch-transport (= 1.0.5)
    elasticsearch-api (1.0.5)
      multi_json
    elasticsearch-model (0.1.5)
      activesupport (> 3)
      elasticsearch (> 0.4)
      hashie
    elasticsearch-rails (0.1.5)
    elasticsearch-transport (1.0.5)
      faraday
      multi_json
    erubis (2.7.0)
    execjs (2.0.2)
    factory_girl (4.4.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.4.1)
      factory_girl (~> 4.4.0)
      railties (>= 3.0.0)
    faraday (0.9.0)
      multipart-post (>= 1.2, < 3)
    friendly_id (5.0.4)
      activerecord (>= 4.0.0)
    fssm (0.2.10)
    gretel (3.0.7)
      rails (>= 3.2.0)
    hashie (3.3.1)
    hike (1.2.3)
    i18n (0.6.9)
    jbuilder (1.5.3)
      activesupport (>= 3.0.0)
      multi_json (>= 1.2.0)
    jquery-rails (3.1.0)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.1)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    method_source (0.8.2)
    mime-types (1.25.1)
    mini_portile (0.6.0)
    minitest (4.7.5)
    mono_logger (1.1.0)
    multi_json (1.9.2)
    multipart-post (2.0.0)
    nokogiri (1.6.3.1)
      mini_portile (= 0.6.0)
    orm_adapter (0.5.0)
    paperclip (4.1.1)
      activemodel (>= 3.0.0)
      activesupport (>= 3.0.0)
      cocaine (~> 0.5.3)
      mime-types
    pg (0.17.1)
    polyglot (0.3.4)
    pry (0.10.1)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    pry-doc (0.6.0)
      pry (~> 0.9)
      yard (~> 0.8)
    puma (2.8.2)
      rack (>= 1.1, < 2.0)
    rack (1.5.2)
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.0.4)
      actionmailer (= 4.0.4)
      actionpack (= 4.0.4)
      activerecord (= 4.0.4)
      activesupport (= 4.0.4)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.0.4)
      sprockets-rails (~> 2.0.0)
    rails_12factor (0.0.2)
      rails_serve_static_assets
      rails_stdout_logging
    rails_serve_static_assets (0.0.2)
    rails_stdout_logging (0.0.3)
    railties (4.0.4)
      actionpack (= 4.0.4)
      activesupport (= 4.0.4)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.2.2)
    rdoc (4.1.1)
      json (~> 1.4)
    redis (3.1.0)
    redis-namespace (1.5.1)
      redis (~> 3.0, >= 3.0.4)
    rspec-core (2.14.8)
    rspec-expectations (2.14.5)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.14.6)
    rspec-rails (2.14.2)
      actionpack (>= 3.0)
      activemodel (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    sass (3.2.18)
    sass-rails (4.0.2)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.2.0)
      sprockets (~> 2.8, <= 2.11.0)
      sprockets-rails (~> 2.0.0)
    sdoc (0.4.0)
      json (~> 1.8)
      rdoc (~> 4.0, < 5.0)
    slop (3.6.0)
    sprockets (2.11.0)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.0.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    thor (0.19.1)
    thread_safe (0.3.1)
      atomic (>= 1.1.7, < 2)
    tilt (1.4.1)
    timeliness (0.3.7)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    turbolinks (2.2.1)
      coffee-rails
    tzinfo (0.3.39)
    uglifier (2.5.0)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    validates_timeliness (3.0.14)
      timeliness (~> 0.3.6)
    warden (1.2.3)
      rack (>= 1.0)
    whenever (0.9.2)
      activesupport (>= 2.3.4)
      chronic (>= 0.6.3)
    yard (0.8.7.4)

PLATFORMS
  ruby

DEPENDENCIES
  barby
  bonsai-elasticsearch-rails
  braintree
  chunky_png
  compass-rails
  daemons
  delayed_job_active_record
  devise
  econfig
  elasticsearch-model
  elasticsearch-rails
  factory_girl_rails
  friendly_id (~> 5.0.0)
  gretel
  jbuilder (~> 1.2)
  jquery-rails
  method_source (~> 0.8.2)
  nokogiri (~> 1.6.3.1)
  paperclip (~> 4.1)
  pg
  pry
  pry-doc (~> 0.6.0)
  puma
  rails (= 4.0.4)
  rails_12factor
  resque (~> 2.0.0.pre.1)!
  rspec-rails
  sass-rails (~> 4.0.2)
  sdoc
  turbolinks
  uglifier (>= 1.3.0)
  validates_timeliness
  whenever

@gmalkas
Copy link

gmalkas commented Oct 2, 2014

you're calling Resque.new in your own code, which isn't a thing that can be done

The Readme from the master branch gives the following example:

resque = Resque.new
resque << ImageConversionJob.new

Is 2.0.0.pre1 completely unusable or the documentation is simply out of date?

Thanks!

@luca3m
Copy link

luca3m commented Feb 24, 2015

some issue of @gmalkas Readme needs an update probably

@eltonokada
Copy link

So, how should i send a job to the queue?

@avgerin0s
Copy link

Resque is still a module and will be converted to a class in 2.0.0.

Documentation in master branch does not represent anything but a specification for the new version.

@AshtonKem
Copy link

For the record, this is incredibly frustrating for end users, as it
isn't called out clearly enough on the master's README. As a result the
documentation feels downright duplicitous.

On Wed, Mar 11, 2015 at 1:41 AM, Aggelos Avgerinos
notifications@github.com wrote:

Resque is still a module and will be converted to a class in 2.0.0.

Documentation in master branch does not represent anything but a
specification for the new version.


Reply to this email directly or view it on GitHub.

@eltonokada
Copy link

So, i think you should write this on the README, as i lost a few hours with this new version, and in the end i will use the 1.x version of resque.

@sepastian
Copy link

Yes, please update the README!

It took me hours and lots of frustration to figure out that Resque 2.0 is not ready yet...

@anagri
Copy link

anagri commented Aug 8, 2015

WTF ?

Can someone just update the README to not show how to integrate v2-pre rather point to v1 ?

Is anyone even maintaining the code ?

@jeremywadsack
Copy link
Contributor

Doesn't it already have that? https://github.com/resque/resque#a-note-about-branches

@AshtonKem
Copy link

I think no matter what it's a bad idea to have purposefully wrong documentation on the master README.

Ashton

Sent from my iPhone

On Aug 10, 2015, at 3:19 PM, Jeremy Wadsack notifications@github.com wrote:

Doesn't it already have that? https://github.com/resque/resque#a-note-about-branches


Reply to this email directly or view it on GitHub.

@hoffmanc
Copy link
Contributor

Why wouldn't 2.0 be a branch instead of master? That is the git workflow
I'm used to seeing (i.e., master is always deployable after CI passes -
feature branches don't get merged in until we are ready to deploy them to
production).

On Mon, Aug 10, 2015 at 5:54 PM, Ashton Kemerling notifications@github.com
wrote:

I think no matter what it's a bad idea to have purposefully wrong
documentation on the master README.

Ashton

Sent from my iPhone

On Aug 10, 2015, at 3:19 PM, Jeremy Wadsack notifications@github.com
wrote:

Doesn't it already have that?
https://github.com/resque/resque#a-note-about-branches


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#1175 (comment).

@leikind
Copy link

leikind commented Aug 13, 2015

When you follow installation instructions on a github page and it does not work because the README does not correspond to the code, this is extremely frustrating. Do you expect every user to find your "Not about branches" and switch the branch? Unbelievable.

If this is a development branch, fine. Just change the default branch to show on opening https://github.com/resque/resque to something else then.

@h8rry
Copy link

h8rry commented Aug 22, 2015

Please make README reflect a stable version.

@cdrage
Copy link

cdrage commented Dec 30, 2015

Readme has been updated :) Let's close these issues? See #976

@steveklabnik
Copy link
Member

Yup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests