-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,13 @@ | |
|
||
Capybara.app = Rack::Builder.new do | ||
map "/" do | ||
ActionDispatch::Static | ||
run Rails.application | ||
if Rails.version.to_f >= 3.0 | ||
ActionDispatch::Static | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
aslakhellesoy
Author
Contributor
|
||
run Rails.application | ||
else # Rails 2 | ||
use Rails::Rack::Static | ||
run ActionController::Dispatcher.new | ||
end | ||
end | ||
end.to_app | ||
|
||
|
1 comment
on commit dba9a04
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rails 3.0.0.beta4 throw this error:
wrong number of arguments (1 for 2) (ArgumentError) wrong number of arguments (1 for 2) (ArgumentError) vendor/gems/rack-1.1.0/lib/rack/builder.rb:54:in
new'
vendor/gems/rack-1.1.0/lib/rack/builder.rb:54:in block in use' vendor/gems/rack-1.1.0/lib/rack/builder.rb:73:in
call'
vendor/gems/rack-1.1.0/lib/rack/builder.rb:73:in block in to_app' vendor/gems/rack-1.1.0/lib/rack/builder.rb:73:in
each'
vendor/gems/rack-1.1.0/lib/rack/builder.rb:73:in inject' vendor/gems/rack-1.1.0/lib/rack/builder.rb:73:in
to_app'
vendor/gems/rack-1.1.0/lib/rack/builder.rb:63:in map' vendor/gems/rack-1.1.0/lib/rack/builder.rb:66:in
map'
vendor/bundler/gems/capybara-f47214fa54f8dae1ca782e48ee86d54cdb2dc0b3-master/lib/capybara/rails.rb:5:in block in <top (required)>' vendor/gems/rack-1.1.0/lib/rack/builder.rb:46:in
instance_eval'
vendor/gems/rack-1.1.0/lib/rack/builder.rb:46:in initialize' vendor/bundler/gems/capybara-f47214fa54f8dae1ca782e48ee86d54cdb2dc0b3-master/lib/capybara/rails.rb:4:in
new'
vendor/bundler/gems/capybara-f47214fa54f8dae1ca782e48ee86d54cdb2dc0b3-master/lib/capybara/rails.rb:4:in <top (required)>' vendor/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:212:in
require'
vendor/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:212:in block in require' vendor/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:200:in
load_dependency'
vendor/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:212:in require' features/support/env.rb:6:in
<top (required)>'
vendor/gems/cucumber-0.8.3/lib/cucumber/rb_support/rb_language.rb:141:in require' vendor/gems/cucumber-0.8.3/lib/cucumber/rb_support/rb_language.rb:141:in
load_code_file'
vendor/gems/cucumber-0.8.3/lib/cucumber/step_mother.rb:84:in load_code_file' vendor/gems/cucumber-0.8.3/lib/cucumber/step_mother.rb:76:in
block in load_code_files'
vendor/gems/cucumber-0.8.3/lib/cucumber/step_mother.rb:75:in each' vendor/gems/cucumber-0.8.3/lib/cucumber/step_mother.rb:75:in
load_code_files'
vendor/gems/cucumber-0.8.3/lib/cucumber/cli/main.rb:53:in execute!' vendor/gems/cucumber-0.8.3/lib/cucumber/cli/main.rb:25:in
execute'
vendor/gems/cucumber-0.8.3/bin/cucumber:8:in <top (required)>'
Shouldn't this be
use ActionDispatch::Static
??