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

wrong number of arguments (2 for 1) project.rb:95 #54

Open
stephan-nordnes-eriksen opened this issue Apr 4, 2014 · 4 comments
Open

Comments

@stephan-nordnes-eriksen
Copy link

I am getting this error, and I have tried every thinkable combination of gem versions + ruby versions. How can I get this to compile on osx? (have also tried with bundle exec)

rake build:osx:app --trace
rake aborted!
wrong number of arguments (2 for 1)
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/releasy-0.2.2/lib/releasy/project.rb:95:in `files='
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/releasy-0.2.2/lib/releasy/dsl_wrapper.rb:51:in `block (3 levels) in initialize'
/Users/my_user_name/Dropbox/Programming/Ruby library/text_analyser/Rakefile:12:in `block in <top (required)>'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/releasy-0.2.2/lib/releasy/dsl_wrapper.rb:63:in `instance_eval'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/releasy-0.2.2/lib/releasy/dsl_wrapper.rb:63:in `initialize'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/releasy-0.2.2/lib/releasy/project.rb:189:in `new'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/releasy-0.2.2/lib/releasy/project.rb:189:in `initialize'
/Users/my_user_name/Dropbox/Programming/Ruby library/text_analyser/Rakefile:6:in `new'
/Users/my_user_name/Dropbox/Programming/Ruby library/text_analyser/Rakefile:6:in `<top (required)>'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/bin/rake:23:in `load'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/bin/rake:23:in `<main>'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/Users/my_user_name/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'

This is my Rakefile:

require 'rubygems'
require 'bundler/setup' # Releasy requires require that your application uses bundler.
require 'releasy'

#<<<
Releasy::Project.new do
  name "Delusion"
  version "1.0.0"
  verbose # Can be removed if you don't want to see all build messages.

  executable "test.rb"
  files "*.rb", "wrappers/*.*"
  exposed_files "README.html", "LICENSE.txt"
  add_link "http://google.com", "Whatever"
  exclude_encoding # Applications that don't use advanced encoding (e.g. Japanese characters) can save build size with this.

  # Create a variety of releases, for all platforms.
  add_build :osx_app do
    url "com.github.delusion"
    wrapper "wrappers/gosu-mac-wrapper-0.7.47.tar.gz" # Assuming this is where you downloaded this file.
    #icon "media/icon.icns"
    add_package :tar_gz
  end

  add_build :source do
    add_package :"7z"
  end

  # If building on a Windows machine, :windows_folder and/or :windows_installer are recommended.
  add_build :windows_folder do
    #icon "media/icon.ico"
    executable_type :windows # Assuming you don't want it to run with a console window.
    add_package :exe # Windows self-extracting archive.
  end

  add_build :windows_installer do
    icon "media/icon.ico"
    start_menu_group "Delusion"
    readme "README.html" # User asked if they want to view readme after install.
    license "LICENSE.txt" # User asked to read this and confirm before installing.
    executable_type :windows # Assuming you don't want it to run with a console window.
    add_package :zip
  end

  # If unable to build on a Windows machine, :windows_wrapped is the only choice.
  add_build :windows_wrapped do
    wrapper "wrappers/ruby-1.9.3-p0-i386-mingw32.7z" # Assuming this is where you downloaded this file.
    executable_type :windows # Assuming you don't want it to run with a console window.
    exclude_tcl_tk # Assuming application doesn't use Tcl/Tk, then it can save a lot of size by using this.
    add_package :zip
  end

  add_deploy :local # Only deploy locally.
end
#>>>
@bil-bas
Copy link
Collaborator

bil-bas commented Apr 4, 2014

Bug in the released version, fixed in the repository (and so shows the wrong instructions in the online docs). Sorry!

Workaround: pass in an array (as only param), not a list of params.
e.g.

files "*.rb", "wrappers/*.*"

should be:

files ["*.rb", "wrappers/*.*"]

@stephan-nordnes-eriksen
Copy link
Author

Ahh!!! Thanks!

I had the same issue for the exposed files.

But now that this is done, it appears to compile properly, but my OSX app does not appear.

Never mind the below. I needed to use bundle exec. But my app still does not appear when I get it to run, either with ruby 1.9.2 or whatever.


If I use ruby 1.9.2 I get a new error:

rake build:osx:app --trace
/Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `block in setup': undefined method `name' for #<Array:0x007fe0492b2e20> (NoMethodError)
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `each'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `map'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `setup'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:114:in `check'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:121:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:33:in `require'
    from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-1.4.2/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `call'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `block in run'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `each'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `run'
    from /Users/my_user_name/.rvm/gems/ruby-1.9.2-p320/bin/ruby_executable_hooks:10:in `<main>'

Sorry for asking so much, but my ninja-skills are apparently failing me.

@stephan-nordnes-eriksen
Copy link
Author

So,

The problem I was having was that I was using the newest version of the gosu-mac-wrapper-0.7.47.tar.gz in stead of the slightly older gosu-mac-wrapper-0.7.44.tar.gz. For some reason the never one did not work. Now that I have the right version, everything compiled :)

@bil-bas
Copy link
Collaborator

bil-bas commented Apr 4, 2014

Great! I assume jlnr has been messing with the layout of files in the wrapper...dang!

I'll leave this open for now since the fact is that the current wrapper doesn't work.

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

2 participants