rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.88k stars 1.99k forks source link

bundle show install gem first even thought it already exist. #3147

Closed deependersingla closed 10 years ago

deependersingla commented 10 years ago

I just added addressable to gem file, when I run bundle this is the output for addressable: Using addressable 2.3.6

then when I do rails c the bundle give's this: Could not find addressable-2.3.6 in any of the sources Run bundle install to install missing gems.

when I do rails s its running fine.

Ruby - ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin12.5.0] Rails - Rails 4.1.0 Any idea?

TimMoore commented 10 years ago

Hi @deependersingla

Could you post the output from running bundle env please?

deependersingla commented 10 years ago

@TimMoore, so good to see you here:

Bundler 1.6.3
Ruby 2.0.0 (2014-02-24 patchlevel 451) [x86_64-darwin12.5.0]
Rubygems 2.4.1
rvm 1.25.28 (stable)
GEM_HOME 

Gemfile
source 'https://rubygems.org'

gem 'rails', '4.1.0'

gem 'rails-api'

group :development do
  gem 'spring'
  gem 'rails-erd'
end

gem 'mysql2' #mysql connection

gem "paperclip", "~> 4.1" # for files
gem 'aws-sdk', '~> 1.0' #aws sdk for paperclip s3 file storage

#for fake data
gem 'populator'

gem "active_model_serializers", "0.8.1"  # fixing this to version because new master don't support caching
gem 'faker'
gem 'actionpack-action_caching'
gem 'faraday'
gem 'rb-readline'

# for background job
gem 'sidekiq'

gem 'nokogiri', "1.6.1"

# for sidekiq web view
gem 'sinatra', require: false
gem 'slim'

gem 'acts_as_list'

#delay job for paper clip
gem 'delayed_paperclip'

#renderer for converting markdown into html
gem 'redcarpet'

#redis-store gem
gem 'redis-rails'

# new relic
gem 'newrelic_rpm'

#rails active model observers
gem 'rails-observers'

gem 'devise'

#for uri problems
gem "addressable"

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# To use Jbuilder templates for JSON
#gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano', :group => :development

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

#testing
group :development, :test do
    gem 'rspec-rails', '2.14'  # fixing it here as 3.0.0 has humungousaurous changes, will update later
    gem 'factory_girl_rails'
    gem 'pry'
  gem 'capybara'
  gem "spork-rails"
  gem "guard-rspec"
  gem "guard-spork"
end

#production
group :production do
    gem 'dalli'
end

group :test do
  gem 'shoulda-matchers'
  gem 'shoulda'
end

Gemfile.lock
GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.1.0)
      actionpack (= 4.1.0)
      actionview (= 4.1.0)
      mail (~> 2.5.4)
    actionpack (4.1.0)
      actionview (= 4.1.0)
      activesupport (= 4.1.0)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    actionpack-action_caching (1.1.1)
      actionpack (>= 4.0.0, < 5.0)
    actionview (4.1.0)
      activesupport (= 4.1.0)
      builder (~> 3.1)
      erubis (~> 2.7.0)
    active_model_serializers (0.8.1)
      activemodel (>= 3.0)
    activemodel (4.1.0)
      activesupport (= 4.1.0)
      builder (~> 3.1)
    activerecord (4.1.0)
      activemodel (= 4.1.0)
      activesupport (= 4.1.0)
      arel (~> 5.0.0)
    activesupport (4.1.0)
      i18n (~> 0.6, >= 0.6.9)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.1)
      tzinfo (~> 1.1)
    acts_as_list (0.4.0)
      activerecord (>= 3.0)
    addressable (2.3.6)
    arel (5.0.1.20140414130214)
    aws-sdk (1.51.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
    bcrypt (3.1.7)
    builder (3.2.2)
    capybara (2.4.1)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    celluloid (0.15.2)
      timers (~> 1.1.0)
    childprocess (0.5.3)
      ffi (~> 1.0, >= 1.0.11)
    choice (0.1.6)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cocaine (0.5.4)
      climate_control (>= 0.0.3, < 1.0)
    coderay (1.1.0)
    connection_pool (2.0.0)
    dalli (2.7.2)
    delayed_paperclip (2.8.0)
      paperclip (>= 3.3)
    devise (3.3.0)
      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)
    erubis (2.7.0)
    factory_girl (4.4.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.4.1)
      factory_girl (~> 4.4.0)
      railties (>= 3.0.0)
    faker (1.4.3)
      i18n (~> 0.5)
    faraday (0.9.0)
      multipart-post (>= 1.2, < 3)
    ffi (1.9.3)
    formatador (0.2.5)
    guard (2.6.1)
      formatador (>= 0.2.4)
      listen (~> 2.7)
      lumberjack (~> 1.0)
      pry (>= 0.9.12)
      thor (>= 0.18.1)
    guard-rspec (4.3.1)
      guard (~> 2.1)
      rspec (>= 2.14, < 4.0)
    guard-spork (1.5.1)
      childprocess (>= 0.2.3)
      guard (>= 1.1)
      spork (>= 0.8.4)
    hike (1.2.3)
    i18n (0.6.11)
    json (1.8.1)
    listen (2.7.9)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
    lumberjack (1.0.9)
    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.5.3)
    minitest (5.4.0)
    multi_json (1.10.1)
    multipart-post (2.0.0)
    mysql2 (0.3.16)
    newrelic_rpm (3.9.1.236)
    nokogiri (1.6.1)
      mini_portile (~> 0.5.0)
    orm_adapter (0.5.0)
    paperclip (4.2.0)
      activemodel (>= 3.0.0)
      activesupport (>= 3.0.0)
      cocaine (~> 0.5.3)
      mime-types
    polyglot (0.3.5)
    populator (1.0.0)
    pry (0.10.1)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    rack (1.5.2)
    rack-protection (1.5.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.1.0)
      actionmailer (= 4.1.0)
      actionpack (= 4.1.0)
      actionview (= 4.1.0)
      activemodel (= 4.1.0)
      activerecord (= 4.1.0)
      activesupport (= 4.1.0)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.1.0)
      sprockets-rails (~> 2.0)
    rails-api (0.2.1)
      actionpack (>= 3.2.11)
      railties (>= 3.2.11)
    rails-erd (1.1.0)
      activerecord (>= 3.0)
      activesupport (>= 3.0)
      choice (~> 0.1.6)
      ruby-graphviz (~> 1.0.4)
    rails-observers (0.1.2)
      activemodel (~> 4.0)
    railties (4.1.0)
      actionpack (= 4.1.0)
      activesupport (= 4.1.0)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.3.2)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.5)
      ffi (>= 0.5.0)
    rb-readline (0.5.1)
    redcarpet (3.1.2)
    redis (3.1.0)
    redis-actionpack (4.0.0)
      actionpack (~> 4)
      redis-rack (~> 1.5.0)
      redis-store (~> 1.1.0)
    redis-activesupport (4.0.0)
      activesupport (~> 4)
      redis-store (~> 1.1.0)
    redis-namespace (1.5.1)
      redis (~> 3.0, >= 3.0.4)
    redis-rack (1.5.0)
      rack (~> 1.5)
      redis-store (~> 1.1.0)
    redis-rails (4.0.0)
      redis-actionpack (~> 4)
      redis-activesupport (~> 4)
      redis-store (~> 1.1.0)
    redis-store (1.1.4)
      redis (>= 2.2)
    rspec (2.14.1)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    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.0)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    ruby-graphviz (1.0.9)
    shoulda (3.5.0)
      shoulda-context (~> 1.0, >= 1.0.1)
      shoulda-matchers (>= 1.4.1, < 3.0)
    shoulda-context (1.2.1)
    shoulda-matchers (2.6.2)
      activesupport (>= 3.0.0)
    sidekiq (3.2.2)
      celluloid (>= 0.15.2)
      connection_pool (>= 2.0.0)
      json
      redis (>= 3.0.6)
      redis-namespace (>= 1.3.1)
    sinatra (1.4.5)
      rack (~> 1.4)
      rack-protection (~> 1.4)
      tilt (~> 1.3, >= 1.3.4)
    slim (2.0.3)
      temple (~> 0.6.6)
      tilt (>= 1.3.3, < 2.1)
    slop (3.6.0)
    spork (1.0.0rc4)
    spork-rails (4.0.0)
      rails (>= 3.0.0, < 5)
      spork (>= 1.0rc0)
    spring (1.1.3)
    sprockets (2.12.1)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.1.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    temple (0.6.8)
    thor (0.19.1)
    thread_safe (0.3.4)
    tilt (1.4.1)
    timers (1.1.0)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    warden (1.2.3)
      rack (>= 1.0)
    xpath (2.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  actionpack-action_caching
  active_model_serializers (= 0.8.1)
  acts_as_list
  addressable
  aws-sdk (~> 1.0)
  capybara
  dalli
  delayed_paperclip
  devise
  factory_girl_rails
  faker
  faraday
  guard-rspec
  guard-spork
  mysql2
  newrelic_rpm
  nokogiri (= 1.6.1)
  paperclip (~> 4.1)
  populator
  pry
  rails (= 4.1.0)
  rails-api
  rails-erd
  rails-observers
  rb-readline
  redcarpet
  redis-rails
  rspec-rails (= 2.14)
  shoulda
  shoulda-matchers
  sidekiq
  sinatra
  slim
  spork-rails
  spring
deependersingla commented 10 years ago

closing it as I deleted repo, cloned it again and it worked

ghost commented 10 years ago

I have the same problem with deependersinglar. I use Bundler version 1.7.0, Rails 4.1.6 on Mac OS X Maverick.

I installed the gem. But then when I ran rails c or rails g, it complained that the gem was not installed. rails s works correctly.

TimMoore commented 10 years ago

@linhchauatl please follow the troubleshooting steps in ISSUES.md. If those don't help, follow the instructions to open a new bug with the details we ask for in that document.

ghost commented 10 years ago

I just figure the problem. The trouble maker is rvm. I create a gemset for my app, and run bundle within this gemset. However, for some reason, when I run rails c or bundle exec rails c, it still looks in the global gemset for the gems it needs.

So after I go to global gemset and install all the gems, it works. Not sure if it is rvm gemset trouble alone, or a combination of bundle + rvm gemset.

deependersingla commented 10 years ago

@linchauati If you have any remote repo, I would say delete the local repo and pull again. It will start working. I solved the problem like that only.

commit your changes and push them before deleting.