Can I use an old Gemlock file contents as new Gem file?












0














I have an old ROR app that is running Ruby 1.9.3, Rails 4.2.4, and MongoDB 3.0. I need to move it to Ruby 2.2.2, Rails 4.5, and MongoDB 3.2.



I took over this project so the code is currently running on hosting service. I have downloaded source code. However, I wanted to build a simple scaffold app locally on my machine with the Gem file from the project that needs updating. First, the gem file of the project doesn't list specific versions of the gem, so if I try to use bundler it is trying to grab all the newer versions of the gems. The Gemlock file of the project does contain the version numbers being used.



My question is can I use the contents of the gemlock file (copy + paste) into my local Gem file then run bundler. Will this work properly, meaning will it get the proper gems (the versions being used on the production server)? I understand that some of those gem version might have been removed. Thinking I just comment those out of the gem file then run bundle install until it works.



    GIT
remote: https://github.com/stripe/stripe-ruby
revision: df2e36287d88726c6a03ec6c1fdc19b5d6e2b274
specs:
stripe (1.27.2)
json (~> 1.8.1)
rest-client (~> 1.4)

PATH
remote: ./vendor/plugins/mongoid-encrypted-fields-1.2.2
specs:
mongoid-encrypted-fields (1.2.2)
mongoid

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
aescrypt (1.0.0)
arel (6.0.3)
aws-sdk (1.66.0)
aws-sdk-v1 (= 1.66.0)
aws-sdk-v1 (1.66.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
bcrypt (3.1.10)
bson (3.2.4)
bson_ext (1.5.1)
builder (3.2.2)
chronic (0.10.2)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
columnize (0.9.0)
commander (4.3.5)
highline (~> 1.7.2)
daemons (1.2.3)
debugger (1.6.8)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.5)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.8)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (3.5.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
domain_name (0.5.24)
unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.11)
erubis (2.7.0)
ethon (0.8.0)
ffi (>= 1.3.0)
eventmachine (1.0.8)
excon (0.45.4)
execjs (2.6.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faraday (0.9.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.10)
gcm (0.1.0)
httparty
json
geocoder (1.2.11)
gibberish (1.4.0)
globalid (0.3.6)
activesupport (>= 4.1.0)
grape (0.13.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)
hashids (1.0.2)
hashie (3.4.2)
highline (1.7.7)
houston (2.2.3)
commander (~> 4.1)
json
http-cookie (1.0.2)
domain_name (~> 0.5)
httparty (0.13.7)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.7.0)
ice_nine (0.11.1)
iron_core (1.0.9)
rest (>= 3.0.4)
iron_worker_ng (1.6.6)
bundler
iron_core (>= 1.0.6)
rubyzip (>= 1.0.0)
jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
jwt (1.5.1)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
libv8 (3.16.14.11)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mandrill-api (1.0.53)
excon (>= 0.16.0, < 1.0)
json (>= 1.7.7, < 2.0)
mime-types (2.6.2)
mimemagic (0.3.1)
mini_portile (0.6.2)
minitest (5.8.1)
mongo (2.1.1)
bson (~> 3.0)
mongoid (5.0.0)
activemodel (~> 4.0)
mongo (~> 2.1)
origin (~> 2.1)
tzinfo (>= 0.3.37)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
netrc (0.10.3)
newrelic-grape (2.0.0)
grape
newrelic_rpm
newrelic_rpm (3.13.2.302)
nexmo (3.0.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
opentok (2.3.3)
activesupport (>= 2.0)
addressable (~> 2.3)
httparty (~> 0.13.1)
origin (2.1.1)
orm_adapter (0.5.0)
rack (1.6.4)
rack-accept (0.4.5)
rack (>= 0.4)
rack-cors (0.4.0)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.4)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
ref (2.0.0)
responders (2.1.0)
railties (>= 4.2.0, < 5)
rest (3.0.6)
net-http-persistent (>= 2.9.1)
netrc
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rmagick (2.15.4)
rubyzip (1.1.7)
sendgrid-ruby (1.1.6)
faraday (~> 0.9)
mimemagic
smtpapi (~> 0.1)
smtpapi (0.1.0)
sprockets (3.3.5)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thin (1.6.4)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (~> 1.0)
thor (0.19.1)
thread_safe (0.3.5)
timecop (0.8.0)
twilio-ruby (4.4.0)
builder (>= 2.1.2)
jwt (~> 1.0)
multi_json (>= 1.3.0)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
warden (1.2.3)
rack (>= 1.0)

PLATFORMS
ruby

DEPENDENCIES
aescrypt
aws-sdk (~> 1)
bson_ext
chronic
debugger
devise
execjs
factory_girl_rails
gcm
geocoder
gibberish (~> 1.4.0)
grape
hashids
houston
iron_worker_ng
jquery-rails
kaminari
mail
mandrill-api
mongo
mongoid (~> 5.0.0)
mongoid-encrypted-fields!
newrelic-grape
newrelic_rpm
nexmo
oauth2
opentok (~> 2.2)
rack-cors
rails (~> 4.2.4)
rails_12factor
rmagick
sendgrid-ruby
stripe!
therubyracer
thin
timecop
twilio-ruby
typhoeus
uglifier









share|improve this question



























    0














    I have an old ROR app that is running Ruby 1.9.3, Rails 4.2.4, and MongoDB 3.0. I need to move it to Ruby 2.2.2, Rails 4.5, and MongoDB 3.2.



    I took over this project so the code is currently running on hosting service. I have downloaded source code. However, I wanted to build a simple scaffold app locally on my machine with the Gem file from the project that needs updating. First, the gem file of the project doesn't list specific versions of the gem, so if I try to use bundler it is trying to grab all the newer versions of the gems. The Gemlock file of the project does contain the version numbers being used.



    My question is can I use the contents of the gemlock file (copy + paste) into my local Gem file then run bundler. Will this work properly, meaning will it get the proper gems (the versions being used on the production server)? I understand that some of those gem version might have been removed. Thinking I just comment those out of the gem file then run bundle install until it works.



        GIT
    remote: https://github.com/stripe/stripe-ruby
    revision: df2e36287d88726c6a03ec6c1fdc19b5d6e2b274
    specs:
    stripe (1.27.2)
    json (~> 1.8.1)
    rest-client (~> 1.4)

    PATH
    remote: ./vendor/plugins/mongoid-encrypted-fields-1.2.2
    specs:
    mongoid-encrypted-fields (1.2.2)
    mongoid

    GEM
    remote: https://rubygems.org/
    specs:
    actionmailer (4.2.4)
    actionpack (= 4.2.4)
    actionview (= 4.2.4)
    activejob (= 4.2.4)
    mail (~> 2.5, >= 2.5.4)
    rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.4)
    actionview (= 4.2.4)
    activesupport (= 4.2.4)
    rack (~> 1.6)
    rack-test (~> 0.6.2)
    rails-dom-testing (~> 1.0, >= 1.0.5)
    rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (4.2.4)
    activesupport (= 4.2.4)
    builder (~> 3.1)
    erubis (~> 2.7.0)
    rails-dom-testing (~> 1.0, >= 1.0.5)
    rails-html-sanitizer (~> 1.0, >= 1.0.2)
    activejob (4.2.4)
    activesupport (= 4.2.4)
    globalid (>= 0.3.0)
    activemodel (4.2.4)
    activesupport (= 4.2.4)
    builder (~> 3.1)
    activerecord (4.2.4)
    activemodel (= 4.2.4)
    activesupport (= 4.2.4)
    arel (~> 6.0)
    activesupport (4.2.4)
    i18n (~> 0.7)
    json (~> 1.7, >= 1.7.7)
    minitest (~> 5.1)
    thread_safe (~> 0.3, >= 0.3.4)
    tzinfo (~> 1.1)
    addressable (2.3.8)
    aescrypt (1.0.0)
    arel (6.0.3)
    aws-sdk (1.66.0)
    aws-sdk-v1 (= 1.66.0)
    aws-sdk-v1 (1.66.0)
    json (~> 1.4)
    nokogiri (>= 1.4.4)
    axiom-types (0.1.1)
    descendants_tracker (~> 0.0.4)
    ice_nine (~> 0.11.0)
    thread_safe (~> 0.3, >= 0.3.1)
    bcrypt (3.1.10)
    bson (3.2.4)
    bson_ext (1.5.1)
    builder (3.2.2)
    chronic (0.10.2)
    coercible (1.0.0)
    descendants_tracker (~> 0.0.1)
    columnize (0.9.0)
    commander (4.3.5)
    highline (~> 1.7.2)
    daemons (1.2.3)
    debugger (1.6.8)
    columnize (>= 0.3.1)
    debugger-linecache (~> 1.2.0)
    debugger-ruby_core_source (~> 1.3.5)
    debugger-linecache (1.2.0)
    debugger-ruby_core_source (1.3.8)
    descendants_tracker (0.0.4)
    thread_safe (~> 0.3, >= 0.3.1)
    devise (3.5.2)
    bcrypt (~> 3.0)
    orm_adapter (~> 0.1)
    railties (>= 3.2.6, < 5)
    responders
    thread_safe (~> 0.1)
    warden (~> 1.2.3)
    domain_name (0.5.24)
    unf (>= 0.0.5, < 1.0.0)
    equalizer (0.0.11)
    erubis (2.7.0)
    ethon (0.8.0)
    ffi (>= 1.3.0)
    eventmachine (1.0.8)
    excon (0.45.4)
    execjs (2.6.0)
    factory_girl (4.5.0)
    activesupport (>= 3.0.0)
    factory_girl_rails (4.5.0)
    factory_girl (~> 4.5.0)
    railties (>= 3.0.0)
    faraday (0.9.1)
    multipart-post (>= 1.2, < 3)
    ffi (1.9.10)
    gcm (0.1.0)
    httparty
    json
    geocoder (1.2.11)
    gibberish (1.4.0)
    globalid (0.3.6)
    activesupport (>= 4.1.0)
    grape (0.13.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)
    hashids (1.0.2)
    hashie (3.4.2)
    highline (1.7.7)
    houston (2.2.3)
    commander (~> 4.1)
    json
    http-cookie (1.0.2)
    domain_name (~> 0.5)
    httparty (0.13.7)
    json (~> 1.8)
    multi_xml (>= 0.5.2)
    i18n (0.7.0)
    ice_nine (0.11.1)
    iron_core (1.0.9)
    rest (>= 3.0.4)
    iron_worker_ng (1.6.6)
    bundler
    iron_core (>= 1.0.6)
    rubyzip (>= 1.0.0)
    jquery-rails (4.0.5)
    rails-dom-testing (~> 1.0)
    railties (>= 4.2.0)
    thor (>= 0.14, < 2.0)
    json (1.8.3)
    jwt (1.5.1)
    kaminari (0.16.3)
    actionpack (>= 3.0.0)
    activesupport (>= 3.0.0)
    libv8 (3.16.14.11)
    loofah (2.0.3)
    nokogiri (>= 1.5.9)
    mail (2.6.3)
    mime-types (>= 1.16, < 3)
    mandrill-api (1.0.53)
    excon (>= 0.16.0, < 1.0)
    json (>= 1.7.7, < 2.0)
    mime-types (2.6.2)
    mimemagic (0.3.1)
    mini_portile (0.6.2)
    minitest (5.8.1)
    mongo (2.1.1)
    bson (~> 3.0)
    mongoid (5.0.0)
    activemodel (~> 4.0)
    mongo (~> 2.1)
    origin (~> 2.1)
    tzinfo (>= 0.3.37)
    multi_json (1.11.2)
    multi_xml (0.5.5)
    multipart-post (2.0.0)
    net-http-persistent (2.9.4)
    netrc (0.10.3)
    newrelic-grape (2.0.0)
    grape
    newrelic_rpm
    newrelic_rpm (3.13.2.302)
    nexmo (3.0.0)
    nokogiri (1.6.6.2)
    mini_portile (~> 0.6.0)
    oauth2 (1.0.0)
    faraday (>= 0.8, < 0.10)
    jwt (~> 1.0)
    multi_json (~> 1.3)
    multi_xml (~> 0.5)
    rack (~> 1.2)
    opentok (2.3.3)
    activesupport (>= 2.0)
    addressable (~> 2.3)
    httparty (~> 0.13.1)
    origin (2.1.1)
    orm_adapter (0.5.0)
    rack (1.6.4)
    rack-accept (0.4.5)
    rack (>= 0.4)
    rack-cors (0.4.0)
    rack-mount (0.8.3)
    rack (>= 1.0.0)
    rack-test (0.6.3)
    rack (>= 1.0)
    rails (4.2.4)
    actionmailer (= 4.2.4)
    actionpack (= 4.2.4)
    actionview (= 4.2.4)
    activejob (= 4.2.4)
    activemodel (= 4.2.4)
    activerecord (= 4.2.4)
    activesupport (= 4.2.4)
    bundler (>= 1.3.0, < 2.0)
    railties (= 4.2.4)
    sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
    activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.7)
    activesupport (>= 4.2.0.beta, < 5.0)
    nokogiri (~> 1.6.0)
    rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.2)
    loofah (~> 2.0)
    rails_12factor (0.0.3)
    rails_serve_static_assets
    rails_stdout_logging
    rails_serve_static_assets (0.0.4)
    rails_stdout_logging (0.0.4)
    railties (4.2.4)
    actionpack (= 4.2.4)
    activesupport (= 4.2.4)
    rake (>= 0.8.7)
    thor (>= 0.18.1, < 2.0)
    rake (10.4.2)
    ref (2.0.0)
    responders (2.1.0)
    railties (>= 4.2.0, < 5)
    rest (3.0.6)
    net-http-persistent (>= 2.9.1)
    netrc
    rest-client (1.8.0)
    http-cookie (>= 1.0.2, < 2.0)
    mime-types (>= 1.16, < 3.0)
    netrc (~> 0.7)
    rmagick (2.15.4)
    rubyzip (1.1.7)
    sendgrid-ruby (1.1.6)
    faraday (~> 0.9)
    mimemagic
    smtpapi (~> 0.1)
    smtpapi (0.1.0)
    sprockets (3.3.5)
    rack (> 1, < 3)
    sprockets-rails (2.3.3)
    actionpack (>= 3.0)
    activesupport (>= 3.0)
    sprockets (>= 2.8, < 4.0)
    therubyracer (0.12.2)
    libv8 (~> 3.16.14.0)
    ref
    thin (1.6.4)
    daemons (~> 1.0, >= 1.0.9)
    eventmachine (~> 1.0, >= 1.0.4)
    rack (~> 1.0)
    thor (0.19.1)
    thread_safe (0.3.5)
    timecop (0.8.0)
    twilio-ruby (4.4.0)
    builder (>= 2.1.2)
    jwt (~> 1.0)
    multi_json (>= 1.3.0)
    typhoeus (0.8.0)
    ethon (>= 0.8.0)
    tzinfo (1.2.2)
    thread_safe (~> 0.1)
    uglifier (2.7.2)
    execjs (>= 0.3.0)
    json (>= 1.8.0)
    unf (0.1.4)
    unf_ext
    unf_ext (0.0.7.1)
    virtus (1.0.5)
    axiom-types (~> 0.1)
    coercible (~> 1.0)
    descendants_tracker (~> 0.0, >= 0.0.3)
    equalizer (~> 0.0, >= 0.0.9)
    warden (1.2.3)
    rack (>= 1.0)

    PLATFORMS
    ruby

    DEPENDENCIES
    aescrypt
    aws-sdk (~> 1)
    bson_ext
    chronic
    debugger
    devise
    execjs
    factory_girl_rails
    gcm
    geocoder
    gibberish (~> 1.4.0)
    grape
    hashids
    houston
    iron_worker_ng
    jquery-rails
    kaminari
    mail
    mandrill-api
    mongo
    mongoid (~> 5.0.0)
    mongoid-encrypted-fields!
    newrelic-grape
    newrelic_rpm
    nexmo
    oauth2
    opentok (~> 2.2)
    rack-cors
    rails (~> 4.2.4)
    rails_12factor
    rmagick
    sendgrid-ruby
    stripe!
    therubyracer
    thin
    timecop
    twilio-ruby
    typhoeus
    uglifier









    share|improve this question

























      0












      0








      0







      I have an old ROR app that is running Ruby 1.9.3, Rails 4.2.4, and MongoDB 3.0. I need to move it to Ruby 2.2.2, Rails 4.5, and MongoDB 3.2.



      I took over this project so the code is currently running on hosting service. I have downloaded source code. However, I wanted to build a simple scaffold app locally on my machine with the Gem file from the project that needs updating. First, the gem file of the project doesn't list specific versions of the gem, so if I try to use bundler it is trying to grab all the newer versions of the gems. The Gemlock file of the project does contain the version numbers being used.



      My question is can I use the contents of the gemlock file (copy + paste) into my local Gem file then run bundler. Will this work properly, meaning will it get the proper gems (the versions being used on the production server)? I understand that some of those gem version might have been removed. Thinking I just comment those out of the gem file then run bundle install until it works.



          GIT
      remote: https://github.com/stripe/stripe-ruby
      revision: df2e36287d88726c6a03ec6c1fdc19b5d6e2b274
      specs:
      stripe (1.27.2)
      json (~> 1.8.1)
      rest-client (~> 1.4)

      PATH
      remote: ./vendor/plugins/mongoid-encrypted-fields-1.2.2
      specs:
      mongoid-encrypted-fields (1.2.2)
      mongoid

      GEM
      remote: https://rubygems.org/
      specs:
      actionmailer (4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      actionpack (4.2.4)
      actionview (= 4.2.4)
      activesupport (= 4.2.4)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
      actionview (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
      activejob (4.2.4)
      activesupport (= 4.2.4)
      globalid (>= 0.3.0)
      activemodel (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
      activerecord (4.2.4)
      activemodel (= 4.2.4)
      activesupport (= 4.2.4)
      arel (~> 6.0)
      activesupport (4.2.4)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
      addressable (2.3.8)
      aescrypt (1.0.0)
      arel (6.0.3)
      aws-sdk (1.66.0)
      aws-sdk-v1 (= 1.66.0)
      aws-sdk-v1 (1.66.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
      axiom-types (0.1.1)
      descendants_tracker (~> 0.0.4)
      ice_nine (~> 0.11.0)
      thread_safe (~> 0.3, >= 0.3.1)
      bcrypt (3.1.10)
      bson (3.2.4)
      bson_ext (1.5.1)
      builder (3.2.2)
      chronic (0.10.2)
      coercible (1.0.0)
      descendants_tracker (~> 0.0.1)
      columnize (0.9.0)
      commander (4.3.5)
      highline (~> 1.7.2)
      daemons (1.2.3)
      debugger (1.6.8)
      columnize (>= 0.3.1)
      debugger-linecache (~> 1.2.0)
      debugger-ruby_core_source (~> 1.3.5)
      debugger-linecache (1.2.0)
      debugger-ruby_core_source (1.3.8)
      descendants_tracker (0.0.4)
      thread_safe (~> 0.3, >= 0.3.1)
      devise (3.5.2)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
      domain_name (0.5.24)
      unf (>= 0.0.5, < 1.0.0)
      equalizer (0.0.11)
      erubis (2.7.0)
      ethon (0.8.0)
      ffi (>= 1.3.0)
      eventmachine (1.0.8)
      excon (0.45.4)
      execjs (2.6.0)
      factory_girl (4.5.0)
      activesupport (>= 3.0.0)
      factory_girl_rails (4.5.0)
      factory_girl (~> 4.5.0)
      railties (>= 3.0.0)
      faraday (0.9.1)
      multipart-post (>= 1.2, < 3)
      ffi (1.9.10)
      gcm (0.1.0)
      httparty
      json
      geocoder (1.2.11)
      gibberish (1.4.0)
      globalid (0.3.6)
      activesupport (>= 4.1.0)
      grape (0.13.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)
      hashids (1.0.2)
      hashie (3.4.2)
      highline (1.7.7)
      houston (2.2.3)
      commander (~> 4.1)
      json
      http-cookie (1.0.2)
      domain_name (~> 0.5)
      httparty (0.13.7)
      json (~> 1.8)
      multi_xml (>= 0.5.2)
      i18n (0.7.0)
      ice_nine (0.11.1)
      iron_core (1.0.9)
      rest (>= 3.0.4)
      iron_worker_ng (1.6.6)
      bundler
      iron_core (>= 1.0.6)
      rubyzip (>= 1.0.0)
      jquery-rails (4.0.5)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
      json (1.8.3)
      jwt (1.5.1)
      kaminari (0.16.3)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
      libv8 (3.16.14.11)
      loofah (2.0.3)
      nokogiri (>= 1.5.9)
      mail (2.6.3)
      mime-types (>= 1.16, < 3)
      mandrill-api (1.0.53)
      excon (>= 0.16.0, < 1.0)
      json (>= 1.7.7, < 2.0)
      mime-types (2.6.2)
      mimemagic (0.3.1)
      mini_portile (0.6.2)
      minitest (5.8.1)
      mongo (2.1.1)
      bson (~> 3.0)
      mongoid (5.0.0)
      activemodel (~> 4.0)
      mongo (~> 2.1)
      origin (~> 2.1)
      tzinfo (>= 0.3.37)
      multi_json (1.11.2)
      multi_xml (0.5.5)
      multipart-post (2.0.0)
      net-http-persistent (2.9.4)
      netrc (0.10.3)
      newrelic-grape (2.0.0)
      grape
      newrelic_rpm
      newrelic_rpm (3.13.2.302)
      nexmo (3.0.0)
      nokogiri (1.6.6.2)
      mini_portile (~> 0.6.0)
      oauth2 (1.0.0)
      faraday (>= 0.8, < 0.10)
      jwt (~> 1.0)
      multi_json (~> 1.3)
      multi_xml (~> 0.5)
      rack (~> 1.2)
      opentok (2.3.3)
      activesupport (>= 2.0)
      addressable (~> 2.3)
      httparty (~> 0.13.1)
      origin (2.1.1)
      orm_adapter (0.5.0)
      rack (1.6.4)
      rack-accept (0.4.5)
      rack (>= 0.4)
      rack-cors (0.4.0)
      rack-mount (0.8.3)
      rack (>= 1.0.0)
      rack-test (0.6.3)
      rack (>= 1.0)
      rails (4.2.4)
      actionmailer (= 4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      activemodel (= 4.2.4)
      activerecord (= 4.2.4)
      activesupport (= 4.2.4)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.4)
      sprockets-rails
      rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
      rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
      rails-html-sanitizer (1.0.2)
      loofah (~> 2.0)
      rails_12factor (0.0.3)
      rails_serve_static_assets
      rails_stdout_logging
      rails_serve_static_assets (0.0.4)
      rails_stdout_logging (0.0.4)
      railties (4.2.4)
      actionpack (= 4.2.4)
      activesupport (= 4.2.4)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
      rake (10.4.2)
      ref (2.0.0)
      responders (2.1.0)
      railties (>= 4.2.0, < 5)
      rest (3.0.6)
      net-http-persistent (>= 2.9.1)
      netrc
      rest-client (1.8.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 3.0)
      netrc (~> 0.7)
      rmagick (2.15.4)
      rubyzip (1.1.7)
      sendgrid-ruby (1.1.6)
      faraday (~> 0.9)
      mimemagic
      smtpapi (~> 0.1)
      smtpapi (0.1.0)
      sprockets (3.3.5)
      rack (> 1, < 3)
      sprockets-rails (2.3.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
      therubyracer (0.12.2)
      libv8 (~> 3.16.14.0)
      ref
      thin (1.6.4)
      daemons (~> 1.0, >= 1.0.9)
      eventmachine (~> 1.0, >= 1.0.4)
      rack (~> 1.0)
      thor (0.19.1)
      thread_safe (0.3.5)
      timecop (0.8.0)
      twilio-ruby (4.4.0)
      builder (>= 2.1.2)
      jwt (~> 1.0)
      multi_json (>= 1.3.0)
      typhoeus (0.8.0)
      ethon (>= 0.8.0)
      tzinfo (1.2.2)
      thread_safe (~> 0.1)
      uglifier (2.7.2)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
      unf (0.1.4)
      unf_ext
      unf_ext (0.0.7.1)
      virtus (1.0.5)
      axiom-types (~> 0.1)
      coercible (~> 1.0)
      descendants_tracker (~> 0.0, >= 0.0.3)
      equalizer (~> 0.0, >= 0.0.9)
      warden (1.2.3)
      rack (>= 1.0)

      PLATFORMS
      ruby

      DEPENDENCIES
      aescrypt
      aws-sdk (~> 1)
      bson_ext
      chronic
      debugger
      devise
      execjs
      factory_girl_rails
      gcm
      geocoder
      gibberish (~> 1.4.0)
      grape
      hashids
      houston
      iron_worker_ng
      jquery-rails
      kaminari
      mail
      mandrill-api
      mongo
      mongoid (~> 5.0.0)
      mongoid-encrypted-fields!
      newrelic-grape
      newrelic_rpm
      nexmo
      oauth2
      opentok (~> 2.2)
      rack-cors
      rails (~> 4.2.4)
      rails_12factor
      rmagick
      sendgrid-ruby
      stripe!
      therubyracer
      thin
      timecop
      twilio-ruby
      typhoeus
      uglifier









      share|improve this question













      I have an old ROR app that is running Ruby 1.9.3, Rails 4.2.4, and MongoDB 3.0. I need to move it to Ruby 2.2.2, Rails 4.5, and MongoDB 3.2.



      I took over this project so the code is currently running on hosting service. I have downloaded source code. However, I wanted to build a simple scaffold app locally on my machine with the Gem file from the project that needs updating. First, the gem file of the project doesn't list specific versions of the gem, so if I try to use bundler it is trying to grab all the newer versions of the gems. The Gemlock file of the project does contain the version numbers being used.



      My question is can I use the contents of the gemlock file (copy + paste) into my local Gem file then run bundler. Will this work properly, meaning will it get the proper gems (the versions being used on the production server)? I understand that some of those gem version might have been removed. Thinking I just comment those out of the gem file then run bundle install until it works.



          GIT
      remote: https://github.com/stripe/stripe-ruby
      revision: df2e36287d88726c6a03ec6c1fdc19b5d6e2b274
      specs:
      stripe (1.27.2)
      json (~> 1.8.1)
      rest-client (~> 1.4)

      PATH
      remote: ./vendor/plugins/mongoid-encrypted-fields-1.2.2
      specs:
      mongoid-encrypted-fields (1.2.2)
      mongoid

      GEM
      remote: https://rubygems.org/
      specs:
      actionmailer (4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      actionpack (4.2.4)
      actionview (= 4.2.4)
      activesupport (= 4.2.4)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
      actionview (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
      activejob (4.2.4)
      activesupport (= 4.2.4)
      globalid (>= 0.3.0)
      activemodel (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
      activerecord (4.2.4)
      activemodel (= 4.2.4)
      activesupport (= 4.2.4)
      arel (~> 6.0)
      activesupport (4.2.4)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
      addressable (2.3.8)
      aescrypt (1.0.0)
      arel (6.0.3)
      aws-sdk (1.66.0)
      aws-sdk-v1 (= 1.66.0)
      aws-sdk-v1 (1.66.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
      axiom-types (0.1.1)
      descendants_tracker (~> 0.0.4)
      ice_nine (~> 0.11.0)
      thread_safe (~> 0.3, >= 0.3.1)
      bcrypt (3.1.10)
      bson (3.2.4)
      bson_ext (1.5.1)
      builder (3.2.2)
      chronic (0.10.2)
      coercible (1.0.0)
      descendants_tracker (~> 0.0.1)
      columnize (0.9.0)
      commander (4.3.5)
      highline (~> 1.7.2)
      daemons (1.2.3)
      debugger (1.6.8)
      columnize (>= 0.3.1)
      debugger-linecache (~> 1.2.0)
      debugger-ruby_core_source (~> 1.3.5)
      debugger-linecache (1.2.0)
      debugger-ruby_core_source (1.3.8)
      descendants_tracker (0.0.4)
      thread_safe (~> 0.3, >= 0.3.1)
      devise (3.5.2)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
      domain_name (0.5.24)
      unf (>= 0.0.5, < 1.0.0)
      equalizer (0.0.11)
      erubis (2.7.0)
      ethon (0.8.0)
      ffi (>= 1.3.0)
      eventmachine (1.0.8)
      excon (0.45.4)
      execjs (2.6.0)
      factory_girl (4.5.0)
      activesupport (>= 3.0.0)
      factory_girl_rails (4.5.0)
      factory_girl (~> 4.5.0)
      railties (>= 3.0.0)
      faraday (0.9.1)
      multipart-post (>= 1.2, < 3)
      ffi (1.9.10)
      gcm (0.1.0)
      httparty
      json
      geocoder (1.2.11)
      gibberish (1.4.0)
      globalid (0.3.6)
      activesupport (>= 4.1.0)
      grape (0.13.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)
      hashids (1.0.2)
      hashie (3.4.2)
      highline (1.7.7)
      houston (2.2.3)
      commander (~> 4.1)
      json
      http-cookie (1.0.2)
      domain_name (~> 0.5)
      httparty (0.13.7)
      json (~> 1.8)
      multi_xml (>= 0.5.2)
      i18n (0.7.0)
      ice_nine (0.11.1)
      iron_core (1.0.9)
      rest (>= 3.0.4)
      iron_worker_ng (1.6.6)
      bundler
      iron_core (>= 1.0.6)
      rubyzip (>= 1.0.0)
      jquery-rails (4.0.5)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
      json (1.8.3)
      jwt (1.5.1)
      kaminari (0.16.3)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
      libv8 (3.16.14.11)
      loofah (2.0.3)
      nokogiri (>= 1.5.9)
      mail (2.6.3)
      mime-types (>= 1.16, < 3)
      mandrill-api (1.0.53)
      excon (>= 0.16.0, < 1.0)
      json (>= 1.7.7, < 2.0)
      mime-types (2.6.2)
      mimemagic (0.3.1)
      mini_portile (0.6.2)
      minitest (5.8.1)
      mongo (2.1.1)
      bson (~> 3.0)
      mongoid (5.0.0)
      activemodel (~> 4.0)
      mongo (~> 2.1)
      origin (~> 2.1)
      tzinfo (>= 0.3.37)
      multi_json (1.11.2)
      multi_xml (0.5.5)
      multipart-post (2.0.0)
      net-http-persistent (2.9.4)
      netrc (0.10.3)
      newrelic-grape (2.0.0)
      grape
      newrelic_rpm
      newrelic_rpm (3.13.2.302)
      nexmo (3.0.0)
      nokogiri (1.6.6.2)
      mini_portile (~> 0.6.0)
      oauth2 (1.0.0)
      faraday (>= 0.8, < 0.10)
      jwt (~> 1.0)
      multi_json (~> 1.3)
      multi_xml (~> 0.5)
      rack (~> 1.2)
      opentok (2.3.3)
      activesupport (>= 2.0)
      addressable (~> 2.3)
      httparty (~> 0.13.1)
      origin (2.1.1)
      orm_adapter (0.5.0)
      rack (1.6.4)
      rack-accept (0.4.5)
      rack (>= 0.4)
      rack-cors (0.4.0)
      rack-mount (0.8.3)
      rack (>= 1.0.0)
      rack-test (0.6.3)
      rack (>= 1.0)
      rails (4.2.4)
      actionmailer (= 4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      activemodel (= 4.2.4)
      activerecord (= 4.2.4)
      activesupport (= 4.2.4)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.4)
      sprockets-rails
      rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
      rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
      rails-html-sanitizer (1.0.2)
      loofah (~> 2.0)
      rails_12factor (0.0.3)
      rails_serve_static_assets
      rails_stdout_logging
      rails_serve_static_assets (0.0.4)
      rails_stdout_logging (0.0.4)
      railties (4.2.4)
      actionpack (= 4.2.4)
      activesupport (= 4.2.4)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
      rake (10.4.2)
      ref (2.0.0)
      responders (2.1.0)
      railties (>= 4.2.0, < 5)
      rest (3.0.6)
      net-http-persistent (>= 2.9.1)
      netrc
      rest-client (1.8.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 3.0)
      netrc (~> 0.7)
      rmagick (2.15.4)
      rubyzip (1.1.7)
      sendgrid-ruby (1.1.6)
      faraday (~> 0.9)
      mimemagic
      smtpapi (~> 0.1)
      smtpapi (0.1.0)
      sprockets (3.3.5)
      rack (> 1, < 3)
      sprockets-rails (2.3.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
      therubyracer (0.12.2)
      libv8 (~> 3.16.14.0)
      ref
      thin (1.6.4)
      daemons (~> 1.0, >= 1.0.9)
      eventmachine (~> 1.0, >= 1.0.4)
      rack (~> 1.0)
      thor (0.19.1)
      thread_safe (0.3.5)
      timecop (0.8.0)
      twilio-ruby (4.4.0)
      builder (>= 2.1.2)
      jwt (~> 1.0)
      multi_json (>= 1.3.0)
      typhoeus (0.8.0)
      ethon (>= 0.8.0)
      tzinfo (1.2.2)
      thread_safe (~> 0.1)
      uglifier (2.7.2)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
      unf (0.1.4)
      unf_ext
      unf_ext (0.0.7.1)
      virtus (1.0.5)
      axiom-types (~> 0.1)
      coercible (~> 1.0)
      descendants_tracker (~> 0.0, >= 0.0.3)
      equalizer (~> 0.0, >= 0.0.9)
      warden (1.2.3)
      rack (>= 1.0)

      PLATFORMS
      ruby

      DEPENDENCIES
      aescrypt
      aws-sdk (~> 1)
      bson_ext
      chronic
      debugger
      devise
      execjs
      factory_girl_rails
      gcm
      geocoder
      gibberish (~> 1.4.0)
      grape
      hashids
      houston
      iron_worker_ng
      jquery-rails
      kaminari
      mail
      mandrill-api
      mongo
      mongoid (~> 5.0.0)
      mongoid-encrypted-fields!
      newrelic-grape
      newrelic_rpm
      nexmo
      oauth2
      opentok (~> 2.2)
      rack-cors
      rails (~> 4.2.4)
      rails_12factor
      rmagick
      sendgrid-ruby
      stripe!
      therubyracer
      thin
      timecop
      twilio-ruby
      typhoeus
      uglifier






      ruby-on-rails rubygems bundler






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 at 6:54









      jdog

      4,3331659115




      4,3331659115
























          1 Answer
          1






          active

          oldest

          votes


















          0














          You don't need to bother about Gemfile.lock file, First you change the version of gems that you need to update in Gemfile which will update Gemfile.lock after bundle update.



          e.g Change Gemfile to update rails version



          gem 'rails', '4.2.4'


          to



          gem 'rails', '4.5.0'


          And simply bundle update rails this will update rails gem and it's dependencies.



          But you want to update only rails without its dependencies(not recommended at least for gems like Rails)



          e.g. bundle update --source rails  


          Refer bundle update command



          PS: You can add ruby version(=2.2.2) in Gemfile which will automatically switch the ruby version if your are using rvm.






          share|improve this answer























          • I think I might have confused you. I don't want to update my app yet. What I am trying to do first is create a new-app with the same CURRENT gems that are used in production (including exact version numbers being used). I want to do a test and update this new-app to see what gems all need to be updated when I switch the new-app to 2.2.2 and rails 4.5. I then plan to look up what the minimum version of GEMS needing updating are. Go look up those Gems to see what changes have been done between what is now needed (2.2.2/4.5) vs what the current production app is using now.
            – jdog
            Nov 21 at 2:54










          • We have 0% test converage so I want to find out what has changed. Go fix any code. Then do the actual bundle update command on production level code and the app should have less errors.
            – jdog
            Nov 21 at 2:54











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53387704%2fcan-i-use-an-old-gemlock-file-contents-as-new-gem-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You don't need to bother about Gemfile.lock file, First you change the version of gems that you need to update in Gemfile which will update Gemfile.lock after bundle update.



          e.g Change Gemfile to update rails version



          gem 'rails', '4.2.4'


          to



          gem 'rails', '4.5.0'


          And simply bundle update rails this will update rails gem and it's dependencies.



          But you want to update only rails without its dependencies(not recommended at least for gems like Rails)



          e.g. bundle update --source rails  


          Refer bundle update command



          PS: You can add ruby version(=2.2.2) in Gemfile which will automatically switch the ruby version if your are using rvm.






          share|improve this answer























          • I think I might have confused you. I don't want to update my app yet. What I am trying to do first is create a new-app with the same CURRENT gems that are used in production (including exact version numbers being used). I want to do a test and update this new-app to see what gems all need to be updated when I switch the new-app to 2.2.2 and rails 4.5. I then plan to look up what the minimum version of GEMS needing updating are. Go look up those Gems to see what changes have been done between what is now needed (2.2.2/4.5) vs what the current production app is using now.
            – jdog
            Nov 21 at 2:54










          • We have 0% test converage so I want to find out what has changed. Go fix any code. Then do the actual bundle update command on production level code and the app should have less errors.
            – jdog
            Nov 21 at 2:54
















          0














          You don't need to bother about Gemfile.lock file, First you change the version of gems that you need to update in Gemfile which will update Gemfile.lock after bundle update.



          e.g Change Gemfile to update rails version



          gem 'rails', '4.2.4'


          to



          gem 'rails', '4.5.0'


          And simply bundle update rails this will update rails gem and it's dependencies.



          But you want to update only rails without its dependencies(not recommended at least for gems like Rails)



          e.g. bundle update --source rails  


          Refer bundle update command



          PS: You can add ruby version(=2.2.2) in Gemfile which will automatically switch the ruby version if your are using rvm.






          share|improve this answer























          • I think I might have confused you. I don't want to update my app yet. What I am trying to do first is create a new-app with the same CURRENT gems that are used in production (including exact version numbers being used). I want to do a test and update this new-app to see what gems all need to be updated when I switch the new-app to 2.2.2 and rails 4.5. I then plan to look up what the minimum version of GEMS needing updating are. Go look up those Gems to see what changes have been done between what is now needed (2.2.2/4.5) vs what the current production app is using now.
            – jdog
            Nov 21 at 2:54










          • We have 0% test converage so I want to find out what has changed. Go fix any code. Then do the actual bundle update command on production level code and the app should have less errors.
            – jdog
            Nov 21 at 2:54














          0












          0








          0






          You don't need to bother about Gemfile.lock file, First you change the version of gems that you need to update in Gemfile which will update Gemfile.lock after bundle update.



          e.g Change Gemfile to update rails version



          gem 'rails', '4.2.4'


          to



          gem 'rails', '4.5.0'


          And simply bundle update rails this will update rails gem and it's dependencies.



          But you want to update only rails without its dependencies(not recommended at least for gems like Rails)



          e.g. bundle update --source rails  


          Refer bundle update command



          PS: You can add ruby version(=2.2.2) in Gemfile which will automatically switch the ruby version if your are using rvm.






          share|improve this answer














          You don't need to bother about Gemfile.lock file, First you change the version of gems that you need to update in Gemfile which will update Gemfile.lock after bundle update.



          e.g Change Gemfile to update rails version



          gem 'rails', '4.2.4'


          to



          gem 'rails', '4.5.0'


          And simply bundle update rails this will update rails gem and it's dependencies.



          But you want to update only rails without its dependencies(not recommended at least for gems like Rails)



          e.g. bundle update --source rails  


          Refer bundle update command



          PS: You can add ruby version(=2.2.2) in Gemfile which will automatically switch the ruby version if your are using rvm.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 20 at 7:52

























          answered Nov 20 at 7:34









          Pramod Shinde

          9751720




          9751720












          • I think I might have confused you. I don't want to update my app yet. What I am trying to do first is create a new-app with the same CURRENT gems that are used in production (including exact version numbers being used). I want to do a test and update this new-app to see what gems all need to be updated when I switch the new-app to 2.2.2 and rails 4.5. I then plan to look up what the minimum version of GEMS needing updating are. Go look up those Gems to see what changes have been done between what is now needed (2.2.2/4.5) vs what the current production app is using now.
            – jdog
            Nov 21 at 2:54










          • We have 0% test converage so I want to find out what has changed. Go fix any code. Then do the actual bundle update command on production level code and the app should have less errors.
            – jdog
            Nov 21 at 2:54


















          • I think I might have confused you. I don't want to update my app yet. What I am trying to do first is create a new-app with the same CURRENT gems that are used in production (including exact version numbers being used). I want to do a test and update this new-app to see what gems all need to be updated when I switch the new-app to 2.2.2 and rails 4.5. I then plan to look up what the minimum version of GEMS needing updating are. Go look up those Gems to see what changes have been done between what is now needed (2.2.2/4.5) vs what the current production app is using now.
            – jdog
            Nov 21 at 2:54










          • We have 0% test converage so I want to find out what has changed. Go fix any code. Then do the actual bundle update command on production level code and the app should have less errors.
            – jdog
            Nov 21 at 2:54
















          I think I might have confused you. I don't want to update my app yet. What I am trying to do first is create a new-app with the same CURRENT gems that are used in production (including exact version numbers being used). I want to do a test and update this new-app to see what gems all need to be updated when I switch the new-app to 2.2.2 and rails 4.5. I then plan to look up what the minimum version of GEMS needing updating are. Go look up those Gems to see what changes have been done between what is now needed (2.2.2/4.5) vs what the current production app is using now.
          – jdog
          Nov 21 at 2:54




          I think I might have confused you. I don't want to update my app yet. What I am trying to do first is create a new-app with the same CURRENT gems that are used in production (including exact version numbers being used). I want to do a test and update this new-app to see what gems all need to be updated when I switch the new-app to 2.2.2 and rails 4.5. I then plan to look up what the minimum version of GEMS needing updating are. Go look up those Gems to see what changes have been done between what is now needed (2.2.2/4.5) vs what the current production app is using now.
          – jdog
          Nov 21 at 2:54












          We have 0% test converage so I want to find out what has changed. Go fix any code. Then do the actual bundle update command on production level code and the app should have less errors.
          – jdog
          Nov 21 at 2:54




          We have 0% test converage so I want to find out what has changed. Go fix any code. Then do the actual bundle update command on production level code and the app should have less errors.
          – jdog
          Nov 21 at 2:54


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53387704%2fcan-i-use-an-old-gemlock-file-contents-as-new-gem-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]