7

I just upgraded my Dropbox account from a personal account to a business account. As a result it changed my main dropbox name from just 'Dropbox' to 'Company Name Dropbox'.

Now when I try to either launch my rails app or do a rails assets:precompile I get the following error:

$ rails assets:precompile
yarn install v1.22.0
[1/4]   Resolving packages...
success Already up-to-date.
✨  Done in 0.15s.
rails aborted!
URI::InvalidURIError: bad URI(is not URI?): file-digest:///Users/name/Company Name Dropbox/Username/appfolder/jsp/app/assets/stylesheets/trestle/_variables.scss
/.rvm/gems/ruby-2.5.1@myapp/gems/sprockets-3.7.2/lib/sprockets/uri_utils.rb:45:in `split_file_uri'
/.rvm/gems/ruby-2.5.1@myapp/gems/sprockets-3.7.2/lib/sprockets/uri_utils.rb:126:in `parse_file_digest_uri'
/.rvm/gems/ruby-2.5.1@myapp/gems/sprockets-3.7.2/lib/sprockets.rb:159:in `block in <module:Sprockets>'
/.rvm/gems/ruby-2.5.1@myapp/gems/sprockets-3.7.2/lib/sprockets/dependencies.rb:67:in `resolve_dependency'
/.rvm/gems/ruby-2.5.1@myapp/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:23:in `block in initialize'
/.rvm/gems/ruby-2.5.1@myapp/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:59:in `resolve_dependency'

I have updated to the latest available version of Rails 5.2.4.3.

How do I resolve this without changing the location of my project? I need to leave it within my Dropbox folder.

marcamillion
  • 32,933
  • 55
  • 189
  • 380
  • Is it possible to rename the dropbox then? – Ranoiaetep Jun 28 '20 at 00:17
  • @Ranoiaetep unfortunately not :( What do you think is causing it in the name? – marcamillion Jun 28 '20 at 00:21
  • I'm guessing there might be invalid characters in your company name or change of permissions? Sorry not an expert on rails or dropbox, can't help much – Ranoiaetep Jun 28 '20 at 00:35
  • I don't know how bussiness dropboxes are named, but do the spaces in the uri really exist? If so, you may add _ between the words of "company name dropbox" since I don't think it is valid to include spaces in the uri. – whilrun Jun 28 '20 at 09:55
  • @whilrun yeah I can't rename that part of the path. Dropbox handles that. – marcamillion Jun 29 '20 at 00:31
  • @marcamillion So you cannot touch the path by anyway? Maybe you can create a new sprockets task and manually `resolve` and `gsub` the uri? I'm not an expert on these things so I sorry I can't help much. – whilrun Jun 29 '20 at 08:21
  • @whilrun yeah I can't touch the path in anyway unfortunately :( – marcamillion Jun 30 '20 at 00:20

1 Answers1

1

I think you need to use URI.encode(url) so that the whitespace is converted to %20.

Dan M
  • 4,340
  • 8
  • 20