wycats / merb Goto Github PK
View Code? Open in Web Editor NEWmaster merb branch
Home Page: http://www.merbivore.com
License: MIT License
master merb branch
Home Page: http://www.merbivore.com
License: MIT License
Merb development has moved to http://github.com/merb
andy@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
Use 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.
I just discovered Merb today, but I couldn't immediately tell what exactly Merb is or does. Perhaps the home page at merbivore.com/ could be offer some more explanation to newbies?
Thanks!
These 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')
It just does
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.