Skip to content

When running the setup getting dotenv = StringIO.new(dotenv_contents) error #3

@ademdc

Description

@ademdc

Hey, I installed the gem per instruction. I have a .env.production file locally. But when I run cap production dotenv:setup I get the following error:

Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
system
ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
#<Thread:0x00000001064965e0 /Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/sshkit-1.23.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
/Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/sshkit-1.23.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as ubuntu@18.193.113.164: no implicit conversion of nil into String (SSHKit::Runner::ExecuteError)
	from /Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/sshkit-1.23.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/capistrano-dotenv-0.0.5/lib/capistrano/dotenv/tasks.cap:38:in `initialize': no implicit conversion of nil into String (TypeError)

      dotenv = StringIO.new(dotenv_contents)
                            ^^^^^^^^^^^^^^^
	from /Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/capistrano-dotenv-0.0.5/lib/capistrano/dotenv/tasks.cap:38:in `new'
	from /Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/capistrano-dotenv-0.0.5/lib/capistrano/dotenv/tasks.cap:38:in `block (3 levels) in <top (required)>'
	from /Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/sshkit-1.23.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
	from /Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/sshkit-1.23.0/lib/sshkit/backends/abstract.rb:31:in `run'
	from /Users/ademdinarevic/.rvm/gems/ruby-3.2.0/gems/sshkit-1.23.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as ubuntu@19.1123.143.114: no implicit conversion of nil into String (SSHKit::Runner::ExecuteError)

Any ideas here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions