Hi everytime I try to run a heroku command ex. heroku run rails c --app <appname> I am getting this error:
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure (OpenSSL::SSL::SSLError)
(Exc
n::Errors::SocketError)
Backtrace: C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/ssl_socket.rb:83:in
connect'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/ssl_socket.rb:83:in
initialize'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:344:in
new'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:344:in
socket'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:175:in
request_kernel'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:101:in
request'
C:/Program Files (x86)/Heroku/vendor/gems/heroku-api-0.3.4/lib/heroku/api.rb:61:in
request'
C:/Program Files (x86)/Heroku/vendor/gems/heroku-api-0.3.4/lib/heroku/api/login.rb:9:in
post_login'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:76:in api_key'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:185:inask_for_credentials'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:217:in ask_for_and_save_credentials'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:80:inget_credentials'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:70:in password'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:17:inapi'
C:/Program Files (x86)/Heroku/lib/heroku/command/base.rb:40:in api'
C:/Program Files (x86)/Heroku/lib/heroku/command/config.rb:26:inindex'
C:/Program Files (x86)/Heroku/lib/heroku/command.rb:193:in run'
C:/Program Files (x86)/Heroku/lib/heroku/cli.rb:25:instart'
C:/Program Files (x86)/Heroku/bin/heroku:25:in `'
Command: heroku config
Version: heroku-toolbelt/2.30.3 (i386-mingw32) ruby/1.9.2
What is the problem with this?
I got the same probleme, and the reason seems be the same: Your heroku toolbelt is outdated. Check it out: https://github.com/heroku/heroku/issues/1235
Get the current version in: https://toolbelt.heroku.com/windows
From your command its seems like you want to run Console not application. If you have multiple environments (staging / production / etc) you need this command:
heroku run -a app-name console
If you only have a single environment and never setup staging or other environments you can just run:
heroku run console
For more details please check this https://github.com/nemrow/rails_app_cheatsheet/blob/master/heroku.rdoc
Heroku only runs in one environment at a time, which is configured by the RAILS_ENV and RACK_ENV environments variables.
Note: Make sure that it is not in your .gitignore file. Commit and then push the changes to Heroku.
Heroku (along with many other responsible API providers) disabled its support for SSLv3 as of last Thursday: https://status.heroku.com/incidents/678
Related
I have migrated my Ruby on Rails application from Rails 5.1.2 to Rails 5.2.0 to use the encrypted secrets. Application is successfully deployed to Digital Ocean Ubuntu Server. But when I go in browser to access, it shows the following log.
ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:206:in `rescue in _decrypt'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:184:in `_decrypt'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:157:in `decrypt_and_verify'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_file.rb:79:in `decrypt'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_file.rb:42:in `read'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:21:in `read'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:33:in `config'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:38:in `options'
/home/deploy/apps/GeekyCricket/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/core_ext/module/delegation.rb:271:in `method_missing'
(erb):12:in `<main>'
I have added encrypted secrets using rails credentials:edit, which creates config/credentials.yml.enc and master.key.
I also have added the master.key file on /app_name/shared/config/ on my ubuntu server, also placed an env variable RAILS_MASTER_KEY. But still getting this error, I don't know what I am missing here.
Solution A and B are different solutions. Just choose which is good for you.
a. Deploy from Continous Integration
1. Edit deploy.rb
set :default_env, {
"RAILS_ENV" => "production",
"RAILS_MASTER_KEY" => ENV["RAILS_MASTER_KEY"]
}
2. Add RAILS_MASTER_KEY as a variable
Travis CI
GitLab CI
b. Usage of master.key
1. Edit deploy.rb
append :linked_files, "config/master.key"
2. Upload master.key with :linked_files
Let's assume our application's root path is /home/deploy/awesome-project. All we need to do is upload the key file to /home/deploy/awesome-project/shared/config/master.key.
I faced the same problem, when deploying for the first time on my DigitalOcean Droplet, every time I ran RAILS_ENV=production cap production deploy:initial it failed complaining this error - ActiveSupport::MessageEncryptor::InvalidMessage
I tried below options which all failed -
removing master.key and credential.yml.enc file and then deploying again.
adding both files again and deploying.
Finally one solution worked, i just added master.key, removing credentials.yml.enc file, committed it and redeployed, and it worked without changing my deploy.rb file
I am trying to push a Ruby on Rails projekt to my Flynn remote. I am getting this error:
-----> Discovering process types
remote: -e:1:in `<main>': undefined method `keys' for false:FalseClass (NoMethodError)
remote: ERROR: Build failed: exec: job exited with status 1
I have no 'keys' in any ruby file, and I am not even sure if that is what is meant with this error. Is there any logs with further information about the error? The project is working fine locally using Foreman, and an older version is also working fine at Flynn.
This is likely a configuration error and you will need to make sure your environment variables that you've set locally are available in your Flynn environment,
You can set your environment variables on Flynn with the CLI.
My application is running fine over Elasticbeanstalk. as i have connected my repo with gemnasium, so it said about outdated gems and i updated them.
1: First i just ran the bundle update command then deployed i got error
Creating application version archive "app-51c4-160115_105334".
Uploading evercam-admin-live/app-51c4-160115_105334.zip to S3. This may take a while.
Upload Complete.
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
ERROR: [Instance: i-40adb5c9] Command failed on instance. Return code: 1 Output: (TRUNCATED)...ror: cannot load such file -- bundler/setup
/var/app/ondeck/config/boot.rb:3:in `<top (required)>'
/var/app/ondeck/config/application.rb:1:in `<top (required)>'
/var/app/ondeck/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace).
container_command 01seed in .ebextensions/seed.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-40adb5c9'. Aborting the operation.
ERROR: Failed to deploy application.
ERROR: Failed to deploy application.
After searching around over stackoverflow i found out that updating each gem separately will be better and did the same.
Gems with no version number. i did bundle update gemname and for those who are with version number i updated version number in gemfile and again did the the same bundle update gemname
2: it updated the gem as well. and then i deployed that branch again.
and got the EXACT same error again.
anyhelp will be appreciated thanks
I've a rails project which I want to deploy on Heroku. I am using the link https://github.com/ddollar/heroku-accounts for managing multiple accounts on heroku. But whenever i am running the command heroku accounts:set personal It is showing an error like that
warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: undefined method `each' for nil:NilClass (NoMethodError)
Backtrace: /Users/sumitkalra1984/.heroku/plugins/heroku- accounts/lib/accounts/heroku/command/accounts.rb:111:in `set'
/Users/sumitkalra1984/.heroku/client/lib/heroku/command.rb:213:in `run'
/Users/sumitkalra1984/.heroku/client/lib/heroku/cli.rb:28:in `start'
/usr/bin/heroku:24:in `<main>'
Command: heroku accounts:set personal
Plugins: heroku-accounts
Version: heroku-toolbelt/3.0.0 (x86_64-darwin10.8.0) ruby/1.9.3
I bet the you found a solution to your problem, but just in case (and for other like me) you just have to init a git repo. If you try this command in a directory without git repo you will get this error.
Cheers !
Has anyone seen this problem before?
When I try to run the command "heroku create", I get long error with directories related to ruby.
C:\Rails\Waterloop3>heroku create
Creating severe-samurai-489.... done
Created http://severe-samurai-489.heroku.com/ | git#heroku.com:severe-samurai-48
9.git
C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpers.rb:78:in ``': No such file or directory - git remote (Errno::ENOENT)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpe
rs.rb:78:in `block in shell'
from C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `chdir'
from C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `cd'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpe
rs.rb:78:in `shell'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nds/app.rb:265:in `create_git_remote'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nds/app.rb:49:in `create'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nd.rb:48:in `run_internal'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nd.rb:20:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/bin/heroku:13:in
`'
from C:/Ruby192/bin/heroku:19:in `load'
from C:/Ruby192/bin/heroku:19:in `<main>'
This line:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpers.rb:78:in ``': No such file or directory - git remote (Errno::ENOENT)
Says that the heroku gem is try to run git and can't find it. Do you have git installed and running from the command line? It is a requirement, since it is what Heroku uses to manage deployments.