Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 350 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to check your gem list on heroku

#1
I know the command that works to do this, but I don't understand why. What is <code>\`...\`</code> 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 ` `` `?
Reply

#2
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
Reply

#3



For example

heroku run 'gem list'

Becouse

heroku console
is removed from heroku
Reply

#4
In Ruby, you can run a system command either by using [`Kernel#exec`](

[To see links please register here]

) or by placing the contents in backticks. This is the same as typing `gem list` on the command line and getting the result back as a string.
Reply

#5
`heroku console` is basically running an irb console on the remote computer, so you're in a ruby console when you do it. The backticks (`) are a standard way to run a system command in ruby.
Reply

#6
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][1] for more info.


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through