bundle --deployment & --no-deployment

So O have a working 3.1.2 application. I had done a   bundle install --deployment

Now I want to add nokogiri so I added   gem 'nokogiri' to the Gemfile

I then did

- - - -

c:\RailsInstaller\Sites\ultradedup002> bundle install --deployment You are trying to install in deployment mode after changing your Gemfile. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control.

You have added to the Gemfile: * nokogiri

c:\RailsInstaller\Sites\ultradedup002> bundle install You are trying to install in deployment mode after changing your Gemfile. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control.

If this is a development machine, remove the Gemfile freeze by running `bundle install --no-deployment`.

You have added to the Gemfile: * nokogiri

c:\RailsInstaller\Sites\ultradedup002> bundle install --no-deployment . . .

c:\RailsInstaller\Sites\ultradedup002> bundle install --deployment

- - - -

What's going on? Why do I need to go through these contortions?

Ralph Shnelvar

Using deployment mode with bundler requires an up-to-date Gemfile.lock.

See here: http://gembundler.com/man/bundle-install.1.html#DEPLOYMENT-MODE

The machine where you run bundle --deployment, is that a development machine or a deployment machine?? because on http://gembundler.com/ it states

Deploying Your Application

On production servers, you can enable deployment mode:

$ bundle install --deployment

Do not use this flag on development machines. The --deployment flag turns on defaults that are appropriate for a deployment environment. Gems are installed to vendor/bundle and the Gemfile.lock must be checked in and up to date before Bundler is run.

This is how i do it… After i create the rails app i run bundle install then run, bundle package which vendors the gems. Now anytime i need to add any new gem I add it to the Gemfile and run ‘bundle install’ which installs the gem and vendors it too. At the top of my ‘deploy.rb’ file i have require “bundler/capistrano” which handles deployment automatically.

This just works for me.

Gautam Pai

Re[2]: [Rails] bundle --deployment & --no-deployment Saturday, December 31, 2011, 3:24:37 AM, you wrote:

I am so lost.

I’m trying to deploy to Heroku and I am very unfamiliar with procedures for it.

Am I even able to do a bundle whatever on the server they provide?

The machine where you run bundle --deployment, is that a development machine or a deployment machine?? because on http://gembundler.com/ it states

Deploying Your Application

On production servers, you can enable deployment mode:

$ bundle install --deployment

Do not use this flag on development machines. The --deployment flag turns on defaults that are appropriate for a deployment environment. Gems are installed to vendor/bundle and the Gemfile.lock must be checked in and up to date before Bundler is run.

This is how i do it…

After i create the rails app i run

bundle install

then run,

bundle package

which vendors the gems. Now anytime i need to add any new gem I add it to the Gemfile and run ‘bundle install’ which installs the gem and vendors it too.

At the top of my ‘deploy.rb’ file i have require “bundler/capistrano” which handles deployment automatically.

This just works for me.

Gautam Pai

I'm trying to deploy to Heroku and I am very unfamiliar with procedures for it.

Have you read their instructions? It's really pretty simple.

Am I even able to do a bundle whatever on the server they provide?

You don't need to; Heroku uses your Gemfile to make the required gems available to the app at deployment.

Hassan,

Am I even able to do a bundle whatever on the server they provide?

You don't need to; Heroku uses your Gemfile to make the required gems available to the app at deployment.

Dear God!

One sentence and "everything" snaps into focus.

Thank you!

Question: Does that mean I can't add more gems to the gemfile when I do the next upload?

If I need to fix one .rb file (or whatever), do I have to upload the entire app?

I have sooo many questions.

For instance, will Heroku, for a fee, be my ISP for the app? That is, will they host my app and my url: www.ultradedup.com?

Ralph

Question: Does that mean I can't add more gems to the gemfile when I do the next upload?

No, each deployment reads the Gemfile and loads what it needs.

If I need to fix one .rb file (or whatever), do I have to upload the entire app?

Sure, but it's just `git push heroku master` and wait a minute -- not a big deal. Though for quick deployments *anywhere* it's a good idea to separate out large assets (images, video, sound) to some cloud storage provider (e.g. AWS S3).

I have sooo many questions.

For instance, will Heroku, for a fee, be my ISP for the app? That is, will they host my app and my url: www.ultradedup.com?

That's exactly their business, yes :slight_smile:

Hassan,

Saturday, December 31, 2011, 11:27:29 AM, you wrote:

This has nothing to do with Heroku specifically.

I've never used fw_player, but a quick glance at the docs shows it (apparently) accepts a URL as a 'file' argument. Easiest way to find out is try it.

Create an Amazon S3 account and upload a video file to it; put that URL in a page on your development machine. When it works there, it'll work anywhere :slight_smile: