Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no implicit conversion of nil into String #718

Open
bubbaspaarx opened this issue May 21, 2024 · 0 comments
Open

no implicit conversion of nil into String #718

bubbaspaarx opened this issue May 21, 2024 · 0 comments

Comments

@bubbaspaarx
Copy link

bubbaspaarx commented May 21, 2024

I had an error running on our local build and it would give the error when running the rails console

/Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/watcher/abstract.rb:42:in `initialize': no implicit conversion of nil into String (TypeError)
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/watcher/abstract.rb:42:in `new'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/watcher/abstract.rb:42:in `block in add'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/watcher/abstract.rb:41:in `map'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/watcher/abstract.rb:41:in `add'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/application.rb:114:in `rescue in preload'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/application.rb:112:in `preload'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/application.rb:166:in `serve'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/application.rb:148:in `block in run'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/application.rb:142:in `loop'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/application.rb:142:in `run'
from /Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/spring-4.1.3/lib/spring/application/boot.rb:19:in `<top (required)>'
from <internal:/Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/jim.bob/.rbenv/versions/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from -e:1:in `<main>'

After a lot of investigating, it was an error in our code. The line of code seems to bear no relevance to the error.

code

redo if @counter <= 5

which actually causes the error

(eval):2: Can't escape from eval with redo

This took some significant time to debug as the error message was seemingly unrelated to the bad code.
Is there a reason why the error message wasn't explicit about the issue and it's location?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant