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

Status: 500 Internal Server Error private method `split' called for Mime::Type in #3

Closed
niquola opened this issue Apr 28, 2009 · 1 comment
Milestone

Comments

@niquola
Copy link

niquola commented Apr 28, 2009

When request with headers:

Accept application/json,application/javascript
Content-Type application/json
X-Requested-With XMLHttpRequest

We get on server:
Status: 500 Internal Server Error
private method split' called for #<Mime::Type:0xb743a2a8> /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/mime_type.rb:206:inmethod_missing'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:51:in media_type' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:117:inparseable_data?'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:138:in POST' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/request.rb:428:inrequest_parameters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/request.rb:381:in parameters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:1279:inassign_shortcuts'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/base.rb:518:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/filters.rb:606:insass_old_process'
/usr/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/sass/plugin/rails.rb:19:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rescue.rb:65:incall_with_exception'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:91:in dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:111:in_call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:82:in initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:29:incall'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:29:in call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:incache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:9:in cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_cache.rb:28:incall'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/params_parser.rb:15:incall'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rewindable_input.rb:25:in call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:93:incall'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/reloader.rb:9:in call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/failsafe.rb:11:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:insynchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:106:incall'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/static.rb:31:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in each' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:incall'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/log_tailer.rb:17:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:61:inprocess'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:ineach'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:inrun'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:innew'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:ininitialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:inrun'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:34:in run' /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:111 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3

@lifo
Copy link
Member

lifo commented Apr 28, 2009

Please use Rails Lighthouse - https://rails.lighthouseapp.com/

Thanks

arunagw added a commit to arunagw/rails that referenced this issue May 28, 2011
arunagw added a commit to arunagw/rails that referenced this issue May 28, 2011
tenderlove added a commit that referenced this issue May 28, 2011
File From Xml is working now. #3-0-stable
tenderlove added a commit that referenced this issue May 30, 2011
* 3-0-stable:
  File From Xml is working now. #3-0-stable
  Fixing  XMLMini_JDOM #3-0-stable
  fixing test for mysql2
derekkraan added a commit to Springest/rails that referenced this issue Dec 4, 2012
seuros added a commit to seuros/django that referenced this issue Aug 12, 2014
seuros pushed a commit to seuros/django that referenced this issue Aug 12, 2014
 Add Sidekiq adapter/wrapper fixes rails#3
claudiob referenced this issue in claudiob/rails Oct 15, 2014
All the methods that invoke `text_field_tag` (such as `hidden_field_tag`)
and all the methods that invoke `number_field_tag` (that is `range_field_tag`)
do not need to call `stringify_keys` on their `options` parameter since the
`text_field_tag` method [is already doing it internally](https://github.com/claudiob/rails/blob/4159134524f4c78d008eef9d9a17f73a3172dcc8/actionview/lib/action_view/helpers/form_tag_helper.rb#L182):

```ruby
def text_field_tag(name, value = nil, options = {})
  tag :input, { "type" => "text", "name" => name, "id" => sanitize_to_id(name), "value" => value }.update(options.stringify_keys)
end
```

and `number_field_tag` is [already doing it internally](https://github.com/claudiob/rails/blob/e3207bdbba55f3806441f22b175557579bc0b051/actionview/lib/action_view/helpers/form_tag_helper.rb#L780) as well:

```ruby
def number_field_tag(name, value = nil, options = {})
  options = options.stringify_keys
  ...
end

[Note #1: My code uses `merge` to respect the existing behavior of
duplicating the `options` hash before updating its keys, see rails#17096 (comment)]

[Note #2: My code uses symbols instead of strings (e.g.: `:hidden`) to look
forward to future version of Ruby/Raiks (GC symbols); the result of the method,
however, is the same, because the symbols are stringified inside `text_field_tag`]

[Note #3: I had previously created a similar PR rails#17096 but decided to
split it into multiple PRs given the feedback received in the comments]
jmbejar pushed a commit to jmbejar/rails that referenced this issue Jun 2, 2015
Add rake-cors gem (commented) in Gemfile for rails api apps
keepcosmos pushed a commit to keepcosmos/rails that referenced this issue Jul 12, 2015
Active Job Basics: 잡 생성과 큐 등록
tijmenb added a commit to tijmenb/rails that referenced this issue Nov 3, 2015
When a request is made with AJAX and an error occurs, Rails will render
a text-template for the exception instead of the HTML error page
(rails#11960).

The `.text.erb` variant of the `_source` template is currently missing,
causing HTML to be rendered in the response. This commit adds the text
template.

To keep the page scannable we only only show the first three source
extracts.

Related to rails#14745.

Before:

```
~/testing-exceptions  ᐅ curl 'http://localhost:3000/' -H
'X-Requested-With: XMLHttpRequest'
RuntimeError in PostsController#index

    <div class="source " id="frame-source-0">
      <div class="info">
        Extracted source (around line <strong>rails#3</strong>):
      </div>
      <div class="data">
        <table cellpadding="0" cellspacing="0" class="lines">
          <tr>
```

After:

```
~/testing-exceptions  ᐅ curl 'http://localhost:3000/' -H
'X-Requested-With: XMLHttpRequest'
RuntimeError in PostsController#index

Extracted source (around line rails#3):

*3     raise
```
rafaelfranca pushed a commit to rafaelfranca/omg-rails that referenced this issue Jul 31, 2017
Use correct syntax highlighting in erb block
rafaelfranca pushed a commit that referenced this issue Nov 19, 2018
* adding rtl css main file and logic to use
georgeclaghorn added a commit that referenced this issue Dec 26, 2018
rossta pushed a commit to rossta/rails that referenced this issue Dec 12, 2020
dhh pushed a commit that referenced this issue Aug 9, 2022
* This is an attempt to make the assert_enqueued_email_with easier to implement.

* Update actionmailer/test/test_helper_test.rb

Fix spelling.

* Documenting additional tests

* Missing a closing "end"

* Renaming tests for consistency

* Updating name

* Naming and documentation

* Leaving original test unchanged

* Fix test name, add new test

* Add assert_enqueued_emails examples to Rails guide

* Add example to test_helper

* Tweaking the Rails guide (#3)

* Updating Rails guide for consistency.

Co-authored-by: Bry <bryan.hunt@hey.com>
Co-authored-by: Ron Shinall <81988008+ron-shinall@users.noreply.github.com>
zzak referenced this issue in zzak/rails Jan 22, 2023
Use `default-mysql-client` instead of `mysql-client`
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants