bellycard / napa

A simple framework for building APIs with Grape
Other
329 stars 72 forks source link

rake db:reset throws error #195

Closed jay3dec closed 9 years ago

jay3dec commented 9 years ago

After creating a new napa service on bundle install everything works fine. But when we try to create a database using rake db:create --trace, it throws the following error,

WARN: Unresolved specs during Gem::Specification.reset:
      minitest (~> 4.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
rake aborted!
NameError: uninitialized constant Virtus::Configuration::Coercible
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus/configuration.rb:40:in `initialize'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus/builder.rb:28:in `new'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus/builder.rb:28:in `call'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus.rb:152:in `model'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/representable-1.8.5/lib/representable/coercion.rb:5:in `<class:Coercer>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/representable-1.8.5/lib/representable/coercion.rb:4:in `<module:Coercion>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/representable-1.8.5/lib/representable/coercion.rb:3:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/roar-0.12.9/lib/roar/representer/feature/coercion.rb:2:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/roar-0.12.9/lib/roar/representer/feature/coercion.rb:2:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa/output_formatters/representer.rb:3:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa/output_formatters/representer.rb:3:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa.rb:27:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa.rb:27:in `<top (required)>'
/home/jay/AppService/app.rb:6:in `require'
/home/jay/AppService/app.rb:6:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/jay/AppService/Rakefile:6:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/bin/rake:23:in `load'
/home/jay/.rbenv/versions/2.0.0-p576/bin/rake:23:in `<main>'
shaqq commented 9 years ago

@jay3dec could you post your Gemfile.lock?

jay3dec commented 9 years ago

Here it is @shaqq

GEM
  remote: https://rubygems.org/
  specs:
    actionpack (4.0.13)
      activesupport (= 4.0.13)
      builder (~> 3.1.0)
      erubis (~> 2.7.0)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    activemodel (4.0.13)
      activesupport (= 4.0.13)
      builder (~> 3.1.0)
    activerecord (4.0.13)
      activemodel (= 4.0.13)
      activerecord-deprecated_finders (~> 1.0.2)
      activesupport (= 4.0.13)
      arel (~> 4.0.0)
    activerecord-deprecated_finders (1.0.4)
    activesupport (4.0.13)
      i18n (~> 0.6, >= 0.6.9)
      minitest (~> 4.2)
      multi_json (~> 1.3)
      thread_safe (~> 0.1)
      tzinfo (~> 0.3.37)
    addressable (2.3.8)
    arel (4.0.2)
    ast (2.0.0)
    astrolabe (1.3.0)
      parser (>= 2.2.0.pre.3, < 3.0)
    axiom-types (0.1.1)
      descendants_tracker (~> 0.0.4)
      ice_nine (~> 0.11.0)
      thread_safe (~> 0.3, >= 0.3.1)
    builder (3.1.4)
    coderay (1.1.0)
    coercible (1.0.0)
      descendants_tracker (~> 0.0.1)
    crack (0.4.2)
      safe_yaml (~> 1.0.0)
    database_cleaner (1.4.1)
    descendants_tracker (0.0.4)
      thread_safe (~> 0.3, >= 0.3.1)
    diff-lcs (1.2.5)
    docile (1.1.5)
    dotenv (1.0.2)
    equalizer (0.0.11)
    erubis (2.7.0)
    factory_girl (4.5.0)
      activesupport (>= 3.0.0)
    faraday (0.9.1)
      multipart-post (>= 1.2, < 3)
    git (1.2.9.1)
    grape (0.11.0)
      activesupport
      builder
      hashie (>= 2.1.0)
      multi_json (>= 1.3.2)
      multi_xml (>= 0.5.2)
      rack (>= 1.3.0)
      rack-accept
      rack-mount
      virtus (>= 1.0.0)
    grape-entity (0.4.5)
      activesupport
      multi_json (>= 1.3.2)
    grape-swagger (0.10.1)
      grape (>= 0.8.0)
      grape-entity
    hashie (3.4.1)
    honeybadger (1.16.7)
      json
    i18n (0.7.0)
    ice_nine (0.11.1)
    json (1.8.2)
    little-plugger (1.1.3)
    logging (1.8.2)
      little-plugger (>= 1.1.3)
      multi_json (>= 1.8.4)
    method_source (0.8.2)
    mini_portile (0.6.2)
    minitest (4.7.5)
    multi_json (1.11.0)
    multi_xml (0.5.5)
    multipart-post (2.0.0)
    mysql2 (0.3.18)
    napa (0.4.3)
      actionpack (>= 3.2)
      dotenv (~> 1.0)
      git (~> 1.2)
      grape (~> 0.9)
      grape-swagger (~> 0.8)
      logging (~> 1.8)
      octokit (~> 3.5)
      racksh (~> 1.0)
      rake (~> 10.3)
      roar (~> 0.12)
      statsd-ruby (~> 1.2)
      thor (~> 0.19)
      virtus (~> 1.0)
    nokogiri (1.6.6.2)
      mini_portile (~> 0.6.0)
    octokit (3.8.0)
      sawyer (~> 0.6.0, >= 0.5.3)
    parser (2.2.0.3)
      ast (>= 1.1, < 3.0)
    powerpack (0.1.0)
    pry (0.10.1)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    rack (1.5.2)
    rack-accept (0.4.5)
      rack (>= 0.4)
    rack-cors (0.3.1)
    rack-mount (0.8.3)
      rack (>= 1.0.0)
    rack-test (0.6.3)
      rack (>= 1.0)
    racksh (1.0.0)
      rack (>= 1.0)
      rack-test (>= 0.5)
    rainbow (2.0.0)
    rake (10.4.2)
    representable (1.8.5)
      multi_json
      nokogiri
      uber
    roar (0.12.9)
      representable (>= 1.6.0, < 2.0.0)
    rspec (3.2.0)
      rspec-core (~> 3.2.0)
      rspec-expectations (~> 3.2.0)
      rspec-mocks (~> 3.2.0)
    rspec-core (3.2.3)
      rspec-support (~> 3.2.0)
    rspec-expectations (3.2.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.2.0)
    rspec-mocks (3.2.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.2.0)
    rspec-support (3.2.2)
    rubocop (0.30.0)
      astrolabe (~> 1.3)
      parser (>= 2.2.0.1, < 3.0)
      powerpack (~> 0.1)
      rainbow (>= 1.99.1, < 3.0)
      ruby-progressbar (~> 1.4)
    ruby-progressbar (1.7.5)
    safe_yaml (1.0.4)
    sawyer (0.6.0)
      addressable (~> 2.3.5)
      faraday (~> 0.8, < 0.10)
    shotgun (0.9.1)
      rack (>= 1.0)
    simplecov (0.9.2)
      docile (~> 1.1.0)
      multi_json (~> 1.0)
      simplecov-html (~> 0.9.0)
    simplecov-html (0.9.0)
    slop (3.6.0)
    statsd-ruby (1.2.1)
    thor (0.19.1)
    thread_safe (0.3.5)
    tzinfo (0.3.43)
    uber (0.0.13)
    virtus (1.0.5)
      axiom-types (~> 0.1)
      coercible (~> 1.0)
      descendants_tracker (~> 0.0, >= 0.0.3)
      equalizer (~> 0.0, >= 0.0.9)
    webmock (1.21.0)
      addressable (>= 2.3.6)
      crack (>= 0.3.2)

PLATFORMS
  ruby

DEPENDENCIES
  activerecord (~> 4.0.0)
  database_cleaner
  factory_girl
  grape-swagger
  honeybadger (~> 1.16.7)
  json
  mysql2
  napa
  pry
  rack-cors
  rack-test
  roar (~> 0.12.0)
  rspec
  rubocop
  shotgun
  simplecov
  webmock
jay3dec commented 9 years ago

@shaqq Any updated on this issue ??

shaqq commented 9 years ago

Apologies, haven't had time to look at this. This is most likely because we're not locking a specific gem version.

I think it's virtus, and a combination between that and roar. I'm not sure, I'll dig into this the next chance I get.

shaqq commented 9 years ago

@jay3dec can you update your napa version? It's possible this issue is fixed by this:

https://github.com/bellycard/napa/pull/204

jay3dec commented 9 years ago

Hey @shaqq now bundle install throws a new error

/home/jay/.rbenv/versions/2.0.0-p645/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
    from /home/jay/.rbenv/versions/2.0.0-p645/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/bin/bundle:7:in `<main>'
shaqq commented 9 years ago

That error suggests you don't have bundler installed

Shaker Islam - Platform Engineer shaker@bellycard.com www.bellycard.com | @shakerdev

On Thu, May 14, 2015 at 12:30 PM, Jay notifications@github.com wrote:

Hey @shaqq now it throws a new error

/home/jay/.rbenv/versions/2.0.0-p645/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
  from /home/jay/.rbenv/versions/2.0.0-p645/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/bin/bundle:7:in `<main>'

Reply to this email directly or view it on GitHub: https://github.com/bellycard/napa/issues/195#issuecomment-102110311

jay3dec commented 9 years ago

Thanks that was it.