문제

My goal is to use Pry as the console for my Rails app, both locally and on my staging server. But I can't get it to work on Heroku.

I'm following these instructions to get Heroku to use Pry as the console for my Rails app. When I run heroku run console pry, my console prints Running console pry attached to terminal... up, run.1 and then exits. When I run heroku console pry it just says main and then exits.

Any ideas on what I'm doing wrong?

Here's what I've done so far:

  1. In my Gemfile I've added the lines:
    gem 'pry'
    gem 'pry-rails'

  2. I've created a file called pry which contains:
    #!/usr/bin/env ruby
    require 'pry'
    pry

  3. I added the following to all the files in config/environments:
    silence_warnings do
    begin
    require 'pry'
    IRB = Pry
    rescue LoadError
    end
    end

  4. run bundle install

  5. run git push staging master

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top