Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

uninitialized constant Wicked::Wizard #3

Closed
JakeAustwick opened this Issue · 14 comments

7 participants

@JakeAustwick

Getting the following error when using a namespaced controller.

uninitialized constant Wicked::Wizard

The following makes no difference either:
::Wicked::Wizard

@schneems schneems closed this in bde8396
@schneems
Owner

Try 0.1.1 and see if you have the same problem

@plagi

thanks, it's working :)

@JakeAustwick

Fixed, can close this issue.

@schneems
Owner

Woot! Thanks for trying it out!

@Mawaheb

I am facing the same problem, tried version '0.1.1' and '0.1.0' with no luck .

@schneems
Owner

What do you get when you run bundle show wicked ? Do you maybe have require: false in your Gemfile?

@Mawaheb

I get :
/home/mawaheb/.rvm/gems/ruby-1.9.3-p392/gems/wicked-0.1.0

P.S, I am actually trying in include it in my mountable gem... i even tried ::Wicked::Wizard did not work.
I tried to inherit from Wicked::WizardController but then i started getting :
"Undifined action 'show' "

@schneems
Owner

You need to use the latest which is 1.0.2 there is a serious security vulnerability in anything under 1.0.1.

In your Gem you need to make sure to require 'wicked' before you need to use it. It is better to include as a module than inherit. This gem also expects the existance of an ApplicationController which may or may not be present in your system.

@pbraswell

So I've run into this issue also. I'm using Rails 4.0.2. I've tried gem 'wicked', require: true with no luck. "bundle show wicked" gives:

/Users/peterbraswell/.rvm/gems/ruby-2.0.0-p353@checkride/gems/wicked-1.0.2

Any idea what might be wrong?

@schneems
Owner

weird

$ echo "gem 'wicked'" >> Gemfile
2.1.1  ~/documents/projects/codetriage (master)
$ bundle install
Your Gemfile lists the gem wicked (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Using i18n (0.6.9)
Using rake (10.1.1)
Using minitest (4.7.5)
Using multi_json (1.8.4)
Using atomic (1.1.14)
Using builder (3.1.4)
Using tzinfo (0.3.38)
Using erubis (2.7.0)
Using rack (1.5.2)
Using mime-types (1.25.1)
Using polyglot (0.3.4)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.2)
Using addressable (2.3.5)
Using bcrypt-ruby (3.1.1)
Using bluecloth (2.2.0)
Using mini_portile (0.5.1)
Using coffee-script-source (1.6.3)
Using thor (0.18.1)
Using commonjs (0.2.6)
Using safe_yaml (0.9.4)
Using dalli (2.6.4)
Using orm_adapter (0.4.0)
Using dotenv (0.8.0)
Using eventmachine (1.0.3)
Using excon (0.25.3)
Using multipart-post (1.2.0)
Using get_process_mem (0.0.2)
Using rrrretry (0.0.1)
Using hashie (2.0.5)
Using hike (1.2.3)
Using http_parser.rb (0.5.3)
Using multi_xml (0.5.4)
Using httpauth (0.2.0)
Using kgio (2.8.0)
Using kramdown (1.1.0)
Using tilt (1.4.1)
Using bundler (1.5.3)
Using metaclass (0.0.1)
Using mono_logger (1.1.0)
Using pg (0.16.0)
Using rack-timeout (0.0.4)
Using rails_serve_static_assets (0.0.1)
Using rails_stdout_logging (0.0.1)
Using raindrops (0.11.0)
Using redis (3.0.4)
Using sass (3.2.10)
Using shoulda-context (1.1.4)
Using simplecov-html (0.7.1)
Using vcr (2.5.0)
Using will_paginate (3.0.4)
Using thread_safe (0.1.3)
Using execjs (1.4.0)
Using jwt (0.1.8)
Using rack-test (0.6.2)
Using warden (1.2.3)
Using puma (2.7.1)
Using rack-protection (1.5.0)
Using vegas (0.1.11)
Using treetop (1.4.15)
Using launchy (2.3.0)
Using nokogiri (1.6.0)
Using less (2.3.2)
Using crack (0.4.1)
Using dotenv-rails (0.8.0)
Using foreman (0.63.0)
Using faye-websocket (0.4.7)
Using faraday (0.8.8)
Using git_hub_bub (0.0.2)
Using omniauth (1.1.4)
Using httparty (0.11.0)
Using mail_view (1.0.3)
Using sprockets (2.10.1)
Using mocha (0.14.0)
Using rails_12factor (0.0.2)
Using unicorn (4.6.3)
Using redis-namespace (1.3.0)
Using simplecov (0.7.1)
Using activesupport (4.0.3)
Using coffee-script (2.2.0)
Using uglifier (2.1.2)
Using sinatra (1.4.3)
Using mail (2.5.4)
Using xpath (2.0.0)
Using webmock (1.13.0)
Using oauth2 (0.8.1)
Using actionpack (4.0.3)
Using activemodel (4.0.3)
Using shoulda-matchers (2.2.0)
Using skylight (0.1.8)
Using resque (1.24.1)
Using capybara (2.1.0)
Using omniauth-oauth2 (1.1.1)
Using actionmailer (4.0.3)
Using railties (4.0.3)
Using less-rails (2.3.3)
Using sprockets-rails (2.0.1)
Using activerecord (4.0.3)
Using shoulda (3.5.0)
Using resque_def (0.0.3)
Using poltergeist (1.3.0)
Using omniauth-github (1.1.1)
Using coffee-rails (4.0.0)
Using devise (3.0.1)
Using jquery-rails (3.0.4)
Using quiet_assets (1.0.2)
Using sass-rails (4.0.0)
Using sprockets_better_errors (0.0.4)
Using rails (4.0.3)
Using phantomjs (1.8.1.1)
Using maildown (1.0.1)
Using rails_autolink (1.1.0)
Using wicked (1.0.0)
Using teaspoon (0.7.4)
Using puma_auto_tune (0.0.1) from git://github.com/schneems/puma_auto_tune.git (at master)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
2.1.1  ~/documents/projects/codetriage (master)
$ rails c
/Users/schneems/Documents/projects/codetriage/config/initializers/git_hub_bub.rb:2: warning: already initialized constant GitHubBub::Request::USER_AGENT
/Users/schneems/.gem/ruby/2.1.1/gems/git_hub_bub-0.0.2/lib/git_hub_bub/request.rb:7: warning: previous definition of USER_AGENT was here
/Users/schneems/Documents/projects/codetriage/config/initializers/git_hub_bub.rb:3: warning: already initialized constant GitHubBub::Request::RETRIES
/Users/schneems/.gem/ruby/2.1.1/gems/git_hub_bub-0.0.2/lib/git_hub_bub/request.rb:12: warning: previous definition of RETRIES was here
/Users/schneems/Documents/projects/codetriage/config/initializers/git_hub_bub.rb:4: warning: already initialized constant GitHubBub::Request::GITHUB_VERSION
/Users/schneems/.gem/ruby/2.1.1/gems/git_hub_bub-0.0.2/lib/git_hub_bub/request.rb:8: warning: previous definition of GITHUB_VERSION was here
Loading development environment (Rails 4.0.3)
irb(main):001:0> Wicked::Wizard
=> Wicked::Wizard

What happens when you

$ irb
> require 'rubygems'
> require 'wicked'

??? What version of bundler are you using? Can you try upgrading to the latest?

@pbraswell
@schneems
Owner

It's coming from here:

https://github.com/schneems/wicked/blob/master/lib/wicked/controller/concerns/path.rb#L2

I've updated master to explicitly require the AS modules we're using. Can you try setting github: "schneems/wicked" in your gemfile?

In the rails console what happens when you try to use a wicked constant?

@camkidman

+1 at github: "schneems/wicked" -- I was getting the same problem.

@crazyivan

+1 at github: "schneems/wicked" -- was also getting the same problem. (with v1.0.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.