Skip to content

Conversation

@texpert
Copy link
Contributor

@texpert texpert commented Apr 15, 2024

Using the new 1.3.0 version of localhost locally on macOS, the following error is raised:

Uncaught exception: No such file or directory @ rb_file_s_rename - (/Users/thunder/.localhost, /Users/thunder/.local/state/localhost.rb)
	/Users/thunder/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/localhost-1.3.0/lib/localhost/authority.rb:230:in `rename'
	/Users/thunder/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/localhost-1.3.0/lib/localhost/authority.rb:230:in `ensure_authority_path_exists'
	/Users/thunder/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/localhost-1.3.0/lib/localhost/authority.rb:183:in `load'
	/Users/thunder/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/localhost-1.3.0/lib/localhost/authority.rb:44:in `fetch'
	/Users/thunder/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/binder.rb:303:in `localhost_authority'

The new directory can't be created with File.rename(old_root, path), so the change is to use FileUtils.mkdir_p and then FileUtils.mv

Types of Changes

  • Bug fix.

Contribution

@ioquatix
Copy link
Member

This looks okay to me, but do you mind removing the whitespace changes? Maybe something we can add to the editor config file to avoid this happening?

ioquatix

This comment was marked as duplicate.

ioquatix

This comment was marked as duplicate.

@ioquatix ioquatix merged commit 7159819 into socketry:main Apr 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants