railslove / fontello_rails_converter

CLI gem for comfortably working with icon fonts (open, download, convert) from http://fontello.com for usage in Rails apps.
MIT License
73 stars 35 forks source link

No implicit conversion of Nil into String when running fontello convert #29

Closed wizzor closed 9 years ago

wizzor commented 9 years ago

Error message reads:

/home/visa/.rvm/gems/ruby-2.2.1/gems/fontello_rails_converter-0.4.0/lib/fontello_rails_converter/cli.rb:77:in read': no implicit conversion of nil into String (TypeError) from /home/visa/.rvm/gems/ruby-2.2.1/gems/fontello_rails_converter-0.4.0/lib/fontello_rails_converter/cli.rb:77:inconvert_main_stylesheet' from /home/visa/.rvm/gems/ruby-2.2.1/gems/fontello_rails_converter-0.4.0/lib/fontello_rails_converter/cli.rb:62:in convert' from /home/visa/.rvm/gems/ruby-2.2.1/gems/fontello_rails_converter-0.4.0/bin/fontello:134:in<top (required)>' from /home/visa/.rvm/gems/ruby-2.2.1/bin/fontello:23:in load' from /home/visa/.rvm/gems/ruby-2.2.1/bin/fontello:23:in

' from /home/visa/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in eval' from /home/visa/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in
'

For some reason the various fontello_name variables seem to be passed in as empty.

Env: RVM, Rails 4.1.6

Edit: Installed via Bundler + Gemfile

jhilden commented 9 years ago

Thanks for the bug report @wizzor

Could you provide some more information in what context the bug appeared?

The best thing for me to fix the bug would be some concrete steps to reproduce the issue.

I hope you can help me out with fixing this.

wizzor commented 9 years ago

Of course, This was initial usage, I downloaded a Fontello zip, renamed it to fontello.zip, placed in app's /tmp directory Command used was fontello convert --no-download The config.json is inside the fontello-generated zip file, and gets correctly copied over to ./vendor/assets/fonts/config.json

The name value is empty, as I didn't specify a name for Fontello. I will retry with a named fontello font and report back.

wizzor commented 9 years ago

Hi, The process completed successfully after I gave a name to the font package.

As an improvement suggestion, I propose one of the following:

ka8725 commented 9 years ago

@wizzor , how did you give the font package name? If manually change the config.json it will be deleted after running the fontello convert command.

wizzor commented 9 years ago

I renamed the package in fontello UI, saved and redownloaded the package, and then ran fontello convert --no-download again, everything works well now. On 26 Jun 2015 21:27, "Andrey Koleshko" notifications@github.com wrote:

@wizzor https://github.com/wizzor , how did you give the font package name? If manually change the config.json it will be deleted after running the fontello convert command.

— Reply to this email directly or view it on GitHub https://github.com/railslove/fontello_rails_converter/issues/29#issuecomment-115824740 .