How to save the entire Rails application package, including the gems used?

I use a lot of gems. They are very sensitive to each other. Now the modern gem combination is just perfect. I want to save this whole application and reuse it when I continue the next project.

As you know, gems are not promised in the future, rubygem.org
therefore I would like to keep the entire application package and gems. Then I do not need to worry about creating precious stones, if I do not need a new stone. All I need to take care of is just coding in the next project.

Someone told me to use this command and save the entire application folder

bundle install --path=vendor/bundle

After that, my application turned out to be screwed up :( jQuery no longer worked after recompile

So, I needed to replace the entire application folder with the old one, which displayed the gem in /usr/local/bin/ruby /usr/local/lib/ruby/gems/1.9.1

Now jQueryworks fine after recompile:)

For this situation, how can I save the entire application package and gems used for it?

What I want to do, I only want to configure the correct version of Ruby and MySQL.
Then I would like to put this package in it and start coding, rather than deploying an environment around gems.

Can anyone share an idea about this, please?

+5
source share
1 answer

Answer your question

The bundler bundle package --allteam blocks and caches all of your gem files in ./vendor/cache, and you can run bundle install --localit so that it will not check rubygems.org in the future.

, , , " ", , , , , .

    • ?
    • , .
    • , , .
    • , , , .
    • ruby-toolbox.com "".
    • , .
    • (), 3.2.8 , ( ) .
    • ( ). , .

.

+10

All Articles