Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check your gem list on heroku

I know the command that works to do this, but I don't understand why. What is `...` doing in this context.

I know I can run:

heroku console
`gem list`

or

heroku console
`gem list`.split("\n")

to get a nice output, but I don't understand what these are doing. Why the ``?

like image 875
Lee McAlilly Avatar asked Feb 02 '11 20:02

Lee McAlilly


People also ask

How do I install heroku bundles?

When you deploy to Heroku, Bundler will be run automatically as long as a Gemfile is present. If you check in your Gemfile. lock, Heroku will run `bundle install --deployment` . If you want to exclude certain groups using the --without option, you need to use `heroku config` .

What is bundle in rails?

In Rails, bundler provides a constant environment for Ruby projects by tracking and installing suitable gems that are needed. It manages an application's dependencies through its entire life, across many machines, systematically and repeatably. To use bundler, you need to install it.

What is Gemfile in Ruby on Rails?

A Gemfile is a file that is created to describe the gem dependencies required to run a Ruby program. A Gemfile should always be placed in the root of the project directory.


2 Answers

I've updated this in-case someone happens to come across heroku console as it's been disabled.

heroku run gem list

Show gems installed via :git

heroku run bundle show
like image 164
ahmet Avatar answered Oct 21 '22 19:10

ahmet


The back ticks effectively making a system call and return the response that was written to stdout. Take a look at the Kernel ruby docs for more info.

like image 36
Steve Smith Avatar answered Oct 21 '22 17:10

Steve Smith