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

Create command error #4

Open
luvacu opened this issue Nov 25, 2016 · 3 comments
Open

Create command error #4

luvacu opened this issue Nov 25, 2016 · 3 comments

Comments

@luvacu
Copy link

luvacu commented Nov 25, 2016

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:

  1. It fails to rename the extracted template. I fixed it by renaming the folder from pandora_framework_template-master to just pandora_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>'
  1. 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 😞

@DivineDominion
Copy link

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?

@luvacu
Copy link
Author

luvacu commented Jan 10, 2017

That's the issue, I think the name should be pandora_framework_, not pandora_framework_template-master.

@tomekc
Copy link

tomekc commented Oct 17, 2017

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.

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

3 participants