pandora
pandora copied to clipboard
Create command error
Hi,
Thank you for all the effort put in this tool!
Today I was trying pandora for the first time, I got these 2 errors while creating a new framework:
- It fails to rename the extracted template. I fixed it by renaming the folder from
pandora_framework_template-master
to justpandora_framework_
and rerun.
$ pandora create FW_NAME inc.acme
=> Downloading framework template
=> Framework template downloaded
=> Uncompressing template
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `rename': No such file or directory - (/Users/XXXXXX/workspaces/Xcode/FW_NAME/template-master, /Users/XXXXXX/workspaces/Xcode/FW_NAME/FW_NAME) (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:519:in `block in mv'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1558:in `block in fu_each_src_dest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1574:in `fu_each_src_dest0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1556:in `fu_each_src_dest'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:508:in `mv'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/commands/create.rb:59:in `unzip_template'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/commands/create.rb:30:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/client/main.rb:10:in `create'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/exe/pandora:5:in `<top (required)>'
from /usr/local/bin/pandora:23:in `load'
from /usr/local/bin/pandora:23:in `<main>'
- When run again, I got the following issue:
$ pandora create FW_NAME inc.acme
=> Downloading framework template
=> Framework template downloaded
=> Uncompressing template
=> Template uncompressed
=> Renaming files content
/Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/commands/create.rb:79:in `gsub': invalid byte sequence in UTF-8 (ArgumentError)
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/commands/create.rb:79:in `block in rename_files_content'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/commands/create.rb:77:in `each'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/commands/create.rb:77:in `rename_files_content'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/commands/create.rb:32:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/lib/pandora/client/main.rb:10:in `create'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Library/Ruby/Gems/2.0.0/gems/pandora-frameworks-0.1.3/exe/pandora:5:in `<top (required)>'
from /usr/local/bin/pandora:23:in `load'
from /usr/local/bin/pandora:23:in `<main>'
I would love to fix it, but I don't have enough Ruby knowledge 😞
It seems the code contains the new name already: https://github.com/carambalabs/pandora/blob/master/lib/pandora/commands/create.rb#L59
Maybe the gem is outdated?
That's the issue, I think the name should be pandora_framework_
, not pandora_framework_template-master
.
Well, I eventually figured out a way - instead of renaming folders, simply use GitHub source as you suggested, and build the gem:
gem build pandora.gemspec
gem install pandora-frameworks-0.1.3.gem
As of writing this comment, version number is 0.1.3, which, of cource, may change in the future. But I'm sure everybody gets the point.