When you `bundle install --deployment`, gems are installed to the local ./vendor/bundle directory instead of the system, as I mentioned before. So they won't show up in `gem list` or `gem show`, which shows system-installed gems. You can use `bundle show`
if you want, from the app directory.
If you want them installed in the system, there might be a way to get bundler to have it's other --deployment behavior without that. I'm not sure. It's a bundler-specific question, not so much about rubygems in general, although the two are very related
these days.
If you always run a bundle install locally and check in the resultant Gemfile and Gemfile.lock together, and check them out on the deployment machine, you _should_ get the behavior you want even without `--deployment`. `bundle install` should install exactly
the versions listed in the Gemfile.lock, and never change the Gemfile.lock -- in this case installing to system.
Most people consider installing to local ./vendor/bundle in a deployment scenario to be preferable, which is why `bundle install --deployment` does that.
I am very confused as to what you are doing and what you are trying to do and why you are using BUNDLE_GEMFILE=/opt/Gemfile. That's a very weird thing to do.
Normally your Gemfile, and it's corresponding Gemfile.lock, both exist next to each other in the project directory. If you are trying to do something else, you should probably have a good reason, and understand bundler well so you can understand what you're
doing going off the usual path.
The '--deployment' flag is 'remembered' by Bundler, usually in a project-specific `.bundle` file/directory. So when you pass '--no-deployment', all it's doing is turning off the remembered '--deployment' configuration, doing the same thing as if you had
done a `bundle install` command in the first place.
As I explained before, bundle with --deployment stores the gems in a local ./vendor/bundle. So they do not show up in the system bundle installs. Most people consider this preferrable for deployment. Normally in your project app, where the Gemfile is too.
Normally you run `bundle` commands from inside the project directory, have the Gemfile (and Gemfile.lock) in that same project directory, and that is also where --deployment locally-installed gems are installed, in ./vendor/bundle inside that same project
directory.
I don't understand what you are trying to do or why, but my suggestion would be to spend some time with the bundler documentation so you understand how it works. The docs are pretty decent.
http://bundler.io. I'd recommend trying to understand how bundler actually works and what it's intended to do -- and only going away from bundler's default recommended use cases if you have a reason to do so. I don't think you're
going to have much luck just trying different invocations you found on the internet without understanding what bundler is doing.
If you still have questions after spending some time with the docs, I'd recommend asking them on StackOverflow. I don't think I can help you any further here. Good luck!