1

I've pushed my Rails app to a Digital Ocean Dokku droplet, everything works except for Rails console. When I run dokku run myapp rails c this error appears:

/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/irb/completion.rb:9:in `require': libreadline.so.5: cannot open shared object file: No such file or directory - /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/x86_64-linux/readline.so (LoadError)
    from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/irb/completion.rb:9:in `<top (required)>'
    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/commands/console.rb:3:in `require'
    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/commands/console.rb:3:in `<top (required)>'
    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:128:in `require'
    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:128:in `require_command!'
    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:59:in `console'
    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in `<top (required)>'
    from /app/bin/rails:4:in `require'
    from /app/bin/rails:4:in `<main>'

The app was installed on a clean droplet. Dokku has only one plugin installed (Postgres).

4

1 回答 1

9

Adding gem 'rb-readline to Gemfile solved the problem.

于 2014-08-15T19:23:32.013 回答