Every repository with this icon (
Every repository with this icon (
| Description: | master merb branch edit |
-
3 comments Created 7 months ago by adelcambrethorxMerb.thor broken with rubygems-1.3.2user:merbjedixandy@hiro:...project[master*]➤ thor merb:gem:install Beginning transaction wrong number of arguments (4 for 3) /Library/Ruby/Site/1.8/rubygems/dependency_installer.rb:99:in `fetch' /Library/Ruby/Site/1.8/rubygems/dependency_installer.rb:99:in `old_fg' /Users/andy/projects/project/tasks/merb.thor/gem_ext.rb:75:in `find_gems_with_sources' /Library/Ruby/Site/1.8/rubygems/dependency_installer.rb:192:in `find_spec_by_name_and_version' /Library/Ruby/Site/1.8/rubygems/dependency_installer.rb:213:in `install' /Users/andy/projects/project/tasks/merb.thor/ops.rb:82:in `_install' /Users/andy/projects/project/tasks/merb.thor/main.thor:123:in `install' /Users/andy/projects/project/tasks/merb.thor/ops.rb:40:in `rescue_failures' /Users/andy/projects/project/tasks/merb.thor/main.thor:121:in `install' /Users/andy/projects/project/tasks/merb.thor/main.thor:115:in `each' /Users/andy/projects/project/tasks/merb.thor/main.thor:115:in `install' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `send' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `run' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:20:in `parse' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor/runner.rb:155:in `method_missing' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `send' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `run' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:20:in `parse' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/lib/thor.rb:78:in `start' /Library/Ruby/Gems/1.8/gems/thor-0.9.9/bin/thor:7 /usr/bin/thor:19:in `load' /usr/bin/thor:19 Rolling back transaction
Comments
-
thor breaks when merb:gem:install'ing locally-developed (unreleased) gems
1 comment Created 5 months ago by jpr5Use case: work on a new merb project, write a new internal plugin/gem for use in the project, then bundle it in for other devs to use.
Result: thor/rubygems chokes on not being able to "find" the new locally-developed gem, regardless of the gem being installed into the system gem dir or locally inside the app's gem dir.
(Tried from both publicly available merb gems and merb edge gems, with same result.)
Steps to repro:
1. Install a gem that's not (yet) included in the rubygems index (i.e. dm-salesforce) git clone git://github.com/jpr5/dm-salesforce.git cd dm-salesforce rake gem sudo gem install pkg/dm-salesforce-0.9.9.gem 2. Setup new app merb-gen app foo cd foo && merb-gen thor 3. Add gem to app's dependencies cd foo && echo 'dependency "dm-salesforce"' >> config/dependencies.rb 4. Bundle the gems in the app cd foo && thor merb:gem:install Breakage: ... Installing dm-validations-0.9.11 Installing dm-serializer-0.9.11 Installing merb_datamapper-1.0.11 Cannot find dm-salesforce (, runtime) A required dependency dm-salesforce (, runtime) was not found Rolling back transaction $I tried installing the gem into the app gems dir (instead of system), and then invoking thor merb:gem:install. thor breaks a different way; it properly discerns what dm-salesforce's dependencies are and installs them, but cannot "find" them even though they are installed in the system gem directory (httpclient, soap4r, etc).
I noticed that rubygems dependency_installer will slap a ".gem" on the end of the dependency name and attempt to treat it as a path reference. When I change dependencies.rb to read: dependency "/home/jpr5/dm-salesforce/pkg/dm-salesforce-0.9.9", thor properly parses out the dependencies, installs them, and then breaks again:
$ thor merb:gem:install ... Installing dm-validations-0.9.11 Installing dm-serializer-0.9.11 Installing merb_datamapper-1.0.11 Installing rcov-0.8.1.2.0 Building native extensions. This could take a while... Installing columnize-0.3.0 Installing linecache-0.43 Building native extensions. This could take a while... Installing ruby-debug-base-0.10.3 Building native extensions. This could take a while... Installing ruby-debug-0.10.3 Installing httpclient-2.1.4 Installing soap4r-1.5.8 Installing dm-salesforce-0.9.9 A required dependency /home/jpr5/dm-salesforce/pkg/dm-salesforce-0.9.9 (, runtime) was not found Rolling back transaction $AFAICT one of the problems is that the underlying rubygems impl is ignorant of gems that aren't already present in the specs/latest_specs indices.
Comments
chriswebstar
Fri Aug 07 07:50:10 -0700 2009
| link
Run rake gem in the gem's source folder, and copy the generated gem file to MERB_ROOT/gems/cache. Make sure you add it to dependencies.rb, and then call thor merb:gems:redeploy to unfold it.
You only need to keep the file in gems/cache around so thor merb:gem:redeploy works on your production server.
-
Merb::Parse.multipart fails on binary uploads (patch included)
3 comments Created 3 months ago by ujifgcThese patches eliminate error "invalid byte sequence in UTF-8" raised by uploading binaries.
file merb-core/dispatch/request_parsers.rb
52: buf = ""
insert buf.force_encoding('BINARY')66: body = ''
insert body.force_encoding('BINARY')
Comments
Crappy patch. Must set 'BINARY' also to c = input.read(read_size). Is there a nicer workaround?
Uh great... Just set Encoding.default_external = 'BINARY'












change line 81 of gem_ext.rb to
and line 97 to
good stuff jproxx
ditto