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

no implicit conversion of nil into String #1176

Closed
sarjanen opened this issue Sep 18, 2015 · 70 comments
Closed

no implicit conversion of nil into String #1176

sarjanen opened this issue Sep 18, 2015 · 70 comments

Comments

@sarjanen
Copy link

Got this error on rc3 but not on rc2 and I do not do anything fancy here:

class PostSerializer < ActiveModel::Serializer
  attributes :id
end
class Api::V2::PostsController < ApplicationController
  def index
    post = Post.all

    render json: post
  end
end

Application trace:

app/serializers/post_serializer.rb:1:in `<top (required)>'
app/controllers/api/v2/posts_controller.rb:5:in `index'

I get the same error on every adapter

@NullVoxPopuli
Copy link
Contributor

hi, @Padchi,

I'm having issues replicated our error with the given information.

A few questions:

  • Do any other serializers have this issue?
  • Could you post your Post model?
  • Could you post your Post schema entry? (just to see what fields exist on the model)
  • Is it only when you render the result of a {model}.all?

@bf4
Copy link
Member

bf4 commented Sep 18, 2015

Is the id actually nil?

Might be related to 995bbcc

btw, Post.all might not be a good idea, unless you mean that just as example code

@sarjanen
Copy link
Author

Hello @NullVoxPopuli and @bf4!

Do any other serializers have this issue?

All my serializers have the same problem.

Could you post your Post model?

class Post < ActiveRecord::Base
  nilify_blanks

  belongs_to :user
  has_many :comments, as: :commentable, dependent: :destroy
  has_many :attachments, as: :attachable, dependent: :destroy

  extend FriendlyId
  friendly_id :title, use: :slugged

  validates :content, :title, :published_on, presence: true

  before_save :downcase_tags

  private

    def downcase_tags
      self.tags.map!(&:downcase) unless self.tags.blank?
    end 
end

Could you post your Post schema entry? (just to see what fields exist on the model)

  create_table "posts", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t|
    t.string   "title",        limit: 255
    t.text     "content"
    t.string   "image",        limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
    t.uuid     "user_id"
    t.string   "slug",         limit: 255
    t.date     "published_on"
    t.string   "tags",         limit: 255, default: [], array: true
  end

  add_index "posts", ["slug"], name: "index_posts_on_slug", using: :btree
  add_index "posts", ["tags"], name: "index_posts_on_tags", using: :gin

Is it only when you render the result of a {model}.all?

No i tried with a simple show action as well.

Is the id actually nil?

No posts in my database has a null id.

btw, Post.all might not be a good idea, unless you mean that just as example code

That's just my simplified example, but i got the same error with my real code

@bf4
Copy link
Member

bf4 commented Sep 18, 2015

B mobile phone

On Sep 18, 2015, at 2:30 PM, Timmie Sarjanen [email protected] wrote:

No posts in my database has a null id.

Ok, but if you

def id 
  fail object.id.inspect
end

in your PostSerializer, what do you get?

@sarjanen
Copy link
Author

@bf4 Exactly the same thing unfortunately

@bf4
Copy link
Member

bf4 commented Sep 18, 2015

That tells me that your object.id is nil :)

@sarjanen
Copy link
Author

@bf4 I don't get it. If my posts table is empty i just get a response with {"data": [] } and then i tried to add a record in the console and the new record got a ID but i get the same error?

@sarjanen
Copy link
Author

@bf4 and @NullVoxPopuli i have replicated the error, you can find it here https://github.com/Padchi/ams-test/tree/master

@beauby
Copy link
Contributor

beauby commented Sep 20, 2015

Will look into it in an hour.

@dukex
Copy link

dukex commented Sep 21, 2015

Hi @Padchi I cant reproduce the error using your test repo.

I did:

$ bundle install
$ rake db:migrate
$ rails s

The GET /posts is OK, returning a empty JSON object

$ rails c
irb(main): Post.create
irb(main): Post.create
irb(main): Post.create
irb(main): Post.create
irb(main): Post.create

The GET /posts is OK, returning 5 object

{"data":[{"id":"1","type":"post"},{"id":"2","type":"post"},{"id":"3","type":"post"},{"id":"4","type":"post"},{"id":"5","type":"post"}]}

@sarjanen
Copy link
Author

@dukex how is that even possible? I used a fresh clean gemset and i guess that you use the same ruby version as specified in the gemfile?

@chenghung
Copy link

the same problem on 0.10.0 rc3

@dukex
Copy link

dukex commented Sep 22, 2015

Yes @Padchi, using the ruby 2.2.1.p85.

Look my screenshot
screenshot from 2015-09-22 06 47 05

@sarjanen
Copy link
Author

@chenghung it's only on rc3 for me, not on rc2

@sarjanen
Copy link
Author

@dukex I tested the repo on ruby 2.2.3 to and it's the same problem so don't think that's ruby is the problem. But still thinks it's wierd that you don't get the error with the same repo as me.

@dukex
Copy link

dukex commented Sep 22, 2015

I got the Post nil id when I update the scheme with create_table "posts", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t|

but no problems with nil id

ams-test - master! $> rails c                                              [ ruby-2.2.1p85 ]
irb(main):001:0> Post.all
  Post Load (1.0ms)  SELECT "posts".* FROM "posts"
=> #<ActiveRecord::Relation [#<Post id: nil, title: nil, content: nil, created_at: "2015-09-22 10:34:36", updated_at: "2015-09-22 10:34:36">, #<Post id: nil, title: nil, content: nil, created_at: "2015-09-22 10:34:39", updated_at: "2015-09-22 10:34:39">]>
irb(main):002:0> exit
ams-test - master! $> curl http://localhost:3000/posts.json                [ ruby-2.2.1p85 ]
{"data":[{"id":"","type":"post"},{"id":"","type":"post"}]}% 

@sarjanen
Copy link
Author

I don't think it's something wrong with the id, i get the error on this simple thing:

def index
  serializer = Class.new(ActiveModel::Serializer)
end

Know that it's bad code and that it doesn't do anything but just wanted to show that the error throws by just accessing ActiveModel::Serializer

And after that code i finally get something from Framework Trace:

active_model_serializers (0.10.0.rc3) lib/active_model/serializer.rb:152:in `read'
active_model_serializers (0.10.0.rc3) lib/active_model/serializer.rb:152:in `digest_caller_file'
active_model_serializers (0.10.0.rc3) lib/active_model/serializer.rb:47:in `inherited'

believe it is 215fb85 that creates the problem

@beauby
Copy link
Contributor

beauby commented Sep 25, 2015

@Padchi What's your platform? (OS version, ruby version, etc.)

@sarjanen
Copy link
Author

@beauby OS X 10.10.5, RVM 1.26.11, ruby 2.2.1 (also tried 2.2.3). You need something more?

@bernsno
Copy link

bernsno commented Sep 25, 2015

I'm seeing the same in RC3. A simple (contrived) example:

Example serializer

class ScoreSerializer < ActiveModel::Serializer
  attributes :date, :score, :description, :count
end

RC2

irb(main):003:0> ScoreSerializer.new({date: 1, score: 1, description: 1, count: 1}).to_json
=> "{\"object\":{\"date\":1,\"score\":1,\"description\":1,\"count\":1},\"options\":{},\"root\":null,\"meta\":null,\"meta_key\":null,\"scope\":null}"

RC3

irb(main):017:0> ScoreSerializer.new({date: 1, score: 1, description: 1, count: 1}).to_json
TypeError: no implicit conversion of nil into String
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:152:in `read'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:152:in `digest_caller_file'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:47:in `inherited'
  from app/serializers/score_serializer.rb:1:in `<top (required)>'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `load'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `block in load_file'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in `load_file'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in `require_or_load'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
  from (irb):17
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
  from bin/rails:8:in `<top (required)>'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
  from .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
  from .rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  from .rbenv/versions/2.2.1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

@beauby
Copy link
Contributor

beauby commented Oct 4, 2015

@bernsno You should not call serializer.to_json, as it is not what you'd expect anymore. In order to serialize a resource outside of a controller's render call, you have to do the following:

SerializableResource.new({date: 1, score: 1, description: 1, count: 1}, serializer: ScoreSerializer)

@codehugger
Copy link

I managed to replicate the error consistently using edge Rails (5.0.0.alpha fef1064)

git clone git://github.com/rails/rails.git
cd rails && bundle
bundle exec railties/exe/rails new ../myproject --edge --api
cd ../myproject
bundle exec bin/rails g scaffold user email:string
rake db:migrate

Inside the Rails console create a user

User.create(email: "[email protected]")

Launch the Rails server (bundle exec bin/rails s) and produce the error by doing a basic GET request

curl http://locahost:3000/users.json

I don't know if this will help at all but I also discovered that this error only appears in 0.10.0.rc3' but not in '0.10.0.rc2'. So by forcing the version of the gem to 0.10.0.rc2 the error goes away.

gem 'active_model_serializers', '0.10.0.rc2'

@bf4
Copy link
Member

bf4 commented Oct 7, 2015

ScoreSerializer.new({date: 1, score: 1, description: 1, count: 1}).to_json
TypeError: no implicit conversion of nil into String

This is expected behavior. Serializer is just a bad name for historical reasons.

See https://github.com/rails-api/active_model_serializers#using-a-serializer-without-render

@bf4
Copy link
Member

bf4 commented Oct 7, 2015

@codehugger I think you might be having a different issue

@codehugger
Copy link

@bf4 so how would you make my trivial example work using rc3?

@beauby
Copy link
Contributor

beauby commented Oct 7, 2015

@beauby
Copy link
Contributor

beauby commented Oct 7, 2015

Although you should really provide an object rather than a hash.

@codehugger
Copy link

I get that #1176 is the way to do a serialization outside the context of a controller's render call but I am only using the controller's render call when requesting http://localhost:3000/users.json

class UsersController < ApplicationController
  ...
  def index
    @users = User.all
    render json: @users
  end
  ...
end

I am doing no customization what so ever and the generated serializer inside app/serializers looks like this

class UserSerializer < ActiveModel::Serializer
  attributes :id, :email
end

@sarjanen
Copy link
Author

sarjanen commented Oct 8, 2015

With rake db:seed

ams-test[master]% rails c
Loading development environment (Rails 4.2.4)
2.2.1 :001 > p = Post.all
  Post Load (0.8ms)  SELECT "posts".* FROM "posts"
 => #<ActiveRecord::Relation [#<Post id: 6, title: "Test", content: "testing", created_at: "2015-10-08 13:02:32", updated_at: "2015-10-08 13:02:32">]> 

@NullVoxPopuli
Copy link
Contributor

using rake db:seed didn't change anything for me. :-\

@NullVoxPopuli
Copy link
Contributor

I wonder if this is something wrong with the environment?

@sarjanen
Copy link
Author

sarjanen commented Oct 8, 2015

Maybe this isn't supposed to work but:

2.2.1 :005 > Class.new(ActiveModel::Serializer)
Errno::ENOENT: No such file or directory @ rb_sysopen - (irb)
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:152:in `read'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:152:in `digest_caller_file'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:47:in `inherited'
    from (irb):5:in `initialize'
    from (irb):5:in `new'
    from (irb):5
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/railties-4.2.4/lib/rails/commands/console.rb:110:in `start'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/railties-4.2.4/lib/rails/commands/console.rb:9:in `start'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:68:in `console'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
    from /Users/timmiegoranssonsarjanen/Documents/Ruby On Rails/ams-test/bin/rails:8:in `<top (required)>'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/commands/rails.rb:6:in `call'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/command_wrapper.rb:38:in `call'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/application.rb:183:in `block in serve'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/application.rb:156:in `fork'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/application.rb:156:in `serve'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/application.rb:131:in `block in run'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/application.rb:125:in `loop'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/application.rb:125:in `run'
    from /Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/gems/spring-1.4.0/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

@NullVoxPopuli
Copy link
Contributor

why are you doing that?

@sarjanen
Copy link
Author

sarjanen commented Oct 8, 2015

Just tried to replicate:

active_model_serializers (0.10.0.rc3) lib/active_model/serializer.rb:152:in `read'
active_model_serializers (0.10.0.rc3) lib/active_model/serializer.rb:152:in `digest_caller_file'
active_model_serializers (0.10.0.rc3) lib/active_model/serializer.rb:47:in `inherited'

My post 14 days ago, but the same code dosn't give the same error anymore.

@NullVoxPopuli
Copy link
Contributor

@Padchi what happens if you try master of ams in your gemfile?

@sarjanen
Copy link
Author

sarjanen commented Oct 8, 2015

@NullVoxPopuli just tried, exactly the same thing.

@NullVoxPopuli
Copy link
Contributor

@Padchi, @joaomdmoura is going to take a look at this later.

I'm personally of the opinion that the cache_key maybe shouldn't be generated the way it is, because there is no caller_file. This only happens in irb -- I'm unsure as to why a similar error is happening in while your server is running though. cache_key could maybe be generated by using the object_id, but that's a discussion for another time / place.

May I ask, how are you running / starting your server?

@sarjanen
Copy link
Author

sarjanen commented Oct 8, 2015

@NullVoxPopuli With a simple rails s in terminal. Tried with pow but same thing there.

@NullVoxPopuli
Copy link
Contributor

are you using bash?

@sarjanen
Copy link
Author

sarjanen commented Oct 8, 2015

Nope zsh, oh my zsh

@NullVoxPopuli
Copy link
Contributor

I'll install and try zsh, one sec

@NullVoxPopuli
Copy link
Contributor

zsh (aside from not interpreting my PS1 correctly) behaves the same as bash in this scenario. :-\

@sarjanen
Copy link
Author

sarjanen commented Oct 8, 2015

I don't get it, i'm not doing anything fancy except ZSH and RVM...

Whole Framework Trace:

/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:110:in `read'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:110:in `digest_caller_file'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:48:in `inherited'
activesupport (4.2.4) lib/active_support/dependencies.rb:457:in `load'
activesupport (4.2.4) lib/active_support/dependencies.rb:457:in `block in load_file'
activesupport (4.2.4) lib/active_support/dependencies.rb:647:in `new_constants_in'
activesupport (4.2.4) lib/active_support/dependencies.rb:456:in `load_file'
activesupport (4.2.4) lib/active_support/dependencies.rb:354:in `require_or_load'
activesupport (4.2.4) lib/active_support/dependencies.rb:494:in `load_missing_constant'
activesupport (4.2.4) lib/active_support/dependencies.rb:184:in `const_missing'
activesupport (4.2.4) lib/active_support/inflector/methods.rb:261:in `const_get'
activesupport (4.2.4) lib/active_support/inflector/methods.rb:261:in `block in constantize'
activesupport (4.2.4) lib/active_support/inflector/methods.rb:259:in `each'
activesupport (4.2.4) lib/active_support/inflector/methods.rb:259:in `inject'
activesupport (4.2.4) lib/active_support/inflector/methods.rb:259:in `constantize'
activesupport (4.2.4) lib/active_support/inflector/methods.rb:304:in `safe_constantize'
activesupport (4.2.4) lib/active_support/core_ext/string/inflections.rb:77:in `safe_constantize'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:117:in `block in get_serializer_for'
thread_safe (0.3.5) lib/thread_safe/cache.rb:68:in `block in fetch_or_store'
thread_safe (0.3.5) lib/thread_safe/cache.rb:58:in `fetch'
thread_safe (0.3.5) lib/thread_safe/cache.rb:67:in `fetch_or_store'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:115:in `get_serializer_for'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:95:in `block in serializer_for'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:95:in `fetch'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer.rb:95:in `serializer_for'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer/array_serializer.rb:15:in `block (2 levels) in initialize'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer/array_serializer.rb:14:in `fetch'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer/array_serializer.rb:14:in `block in initialize'
activerecord (4.2.4) lib/active_record/relation/delegation.rb:46:in `map'
activerecord (4.2.4) lib/active_record/relation/delegation.rb:46:in `map'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializer/array_serializer.rb:13:in `initialize'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializable_resource.rb:34:in `new'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializable_resource.rb:34:in `serializer_instance'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/active_model/serializable_resource.rb:29:in `adapter'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/action_controller/serialization.rb:33:in `get_serializer'
/Users/timmiegoranssonsarjanen/.rvm/gems/ruby-2.2.1@ams-test/bundler/gems/active_model_serializers-9a6ddf322d79/lib/action_controller/serialization.rb:50:in `block (2 levels) in <module:Serialization>'
actionpack (4.2.4) lib/action_controller/metal/renderers.rb:45:in `block in _render_to_body_with_renderer'
/Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/set.rb:283:in `each_key'
/Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/set.rb:283:in `each'
actionpack (4.2.4) lib/action_controller/metal/renderers.rb:41:in `_render_to_body_with_renderer'
actionpack (4.2.4) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
actionpack (4.2.4) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (4.2.4) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
activesupport (4.2.4) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
activesupport (4.2.4) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:43:in `render'
actionpack (4.2.4) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.4) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
activerecord (4.2.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.4) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.4) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.4) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.4) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `call'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:45:in `serve'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:821:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
activerecord (4.2.4) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
activerecord (4.2.4) lib/active_record/migration.rb:377:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.4) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.4) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.2.1) lib/web_console/middleware.rb:39:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.4) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.4) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.4) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.4) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.4) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.4) lib/action_dispatch/middleware/static.rb:116:in `call'
railties (4.2.4) lib/rails/engine.rb:518:in `call'
railties (4.2.4) lib/rails/application.rb:165:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
/Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/Users/timmiegoranssonsarjanen/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'

@NullVoxPopuli
Copy link
Contributor

my next step would maybe see if you can replicate it on a linux vm? using virtualbox or something?
otherwise I'm personally out of ideas.

@bf4
Copy link
Member

bf4 commented Oct 8, 2015

We need to write up this debug stuff in contributing or troubleshooting

@NullVoxPopuli
Copy link
Contributor

👍 @bf4

bf4 added a commit to bf4/active_model_serializers that referenced this issue Oct 9, 2015
@nickgnd
Copy link

nickgnd commented Oct 10, 2015

I've the same error only in production environment with active_model_serializers 0.10.0.rc3, instead with rc2 version all works well.
I've just pushed a repository with a basic app with 1 model to reproduce the error
https://github.com/nickgnd/AMS_rc3_bug

My rvm info:

ruby-2.2-head:

  system:
    uname:       "Darwin MacBook-Pro-di-Nicolo.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64"
    system:      "osx/10.10/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)"
    zsh:         "/bin/zsh => zsh 5.0.5 (x86_64-apple-darwin14.0)"

  rvm:
    version:      "rvm 1.26.9 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]"
    updated:      "8 months 25 days 11 minutes 56 seconds ago"
    path:         "/Users/Nico/.rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.2.4p178"
    date:         "2015-09-30"
    platform:     "x86_64-darwin14"
    patchlevel:   "2015-09-30 revision 51987"
    full_version: "ruby 2.2.4p178 (2015-09-30 revision 51987) [x86_64-darwin14]"

  homes:
    gem:          "/Users/Nico/.rvm/gems/ruby-2.2-head"
    ruby:         "/Users/Nico/.rvm/rubies/ruby-2.2-head"

  binaries:
    ruby:         "/Users/Nico/.rvm/rubies/ruby-2.2-head/bin/ruby"
    irb:          "/Users/Nico/.rvm/rubies/ruby-2.2-head/bin/irb"
    gem:          "/Users/Nico/.rvm/rubies/ruby-2.2-head/bin/gem"
    rake:         "/Users/Nico/.rvm/rubies/ruby-2.2-head/bin/rake"

  environment:
    PATH:         "/Users/Nico/.rvm/gems/ruby-2.2-head/bin:/Users/Nico/.rvm/gems/ruby-2.2-head@global/bin:/Users/Nico/.rvm/rubies/ruby-2.2-head/bin:/Users/Nico/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/webdriver:/opt/X11/bin:/usr/local/mysql/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/webdriver:/opt/X11/bin:/usr/local/mysql/bin"
    GEM_HOME:     "/Users/Nico/.rvm/gems/ruby-2.2-head"
    GEM_PATH:     "/Users/Nico/.rvm/gems/ruby-2.2-head:/Users/Nico/.rvm/gems/ruby-2.2-head@global"
    MY_RUBY_HOME: "/Users/Nico/.rvm/rubies/ruby-2.2-head"
    IRBRC:        "/Users/Nico/.rvm/rubies/ruby-2.2-head/.irbrc"
    RUBYOPT:      ""
    gemset:       ""
produciton.rb (default settings)
Rails.application.configure do
  config.cache_classes = true
  config.eager_load = true
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true
  config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
  config.log_level = :debug
  config.i18n.fallbacks = true
  config.active_support.deprecation = :notify
  config.log_formatter = ::Logger::Formatter.new
  config.active_record.dump_schema_after_migration = false
end
test_serializer.rb
class TestSerializer < ActiveModel::Serializer
  attributes :id, :name
end
test migration
class CreateTests < ActiveRecord::Migration
  def change
    create_table :tests do |t|
      t.string :name

      t.timestamps
    end
  end
end

when i start WEBrick or console or I try to seed the database in Production environment I've got this error:

ams_rc3_bug  bin/rails c -e production           
/Users/Nico/.rvm/gems/ruby-2.2-head/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:152:in `read': no implicit conversion of nil into String (TypeError)
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:152:in `digest_caller_file'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/active_model_serializers-0.10.0.rc3/lib/active_model/serializer.rb:47:in `inherited'
    from /Users/Nico/Documents/Ruby on Rails/ams_rc3_bug/app/serializers/test_serializer.rb:1:in `<top (required)>'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:492:in `load'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:492:in `block in load_file'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:682:in `new_constants_in'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:491:in `load_file'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:388:in `block in require_or_load'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:37:in `block in load_interlock'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/concurrency/share_lock.rb:115:in `exclusive'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies/interlock.rb:11:in `loading'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:37:in `load_interlock'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:369:in `require_or_load'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:345:in `depend_on'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/activesupport/lib/active_support/dependencies.rb:261:in `require_dependency'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/engine.rb:475:in `each'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/engine.rb:475:in `block in eager_load!'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/engine.rb:473:in `each'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/engine.rb:473:in `eager_load!'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/engine.rb:354:in `eager_load!'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/application/finisher.rb:56:in `each'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/initializable.rb:30:in `run'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:345:in `each'
        from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:345:in `call'                                                                                      
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/bundler/gems/rails-0450642c27af/railties/lib/rails/application.rb:343:in `initialize!'
    from /Users/Nico/Documents/Ruby on Rails/ams_rc3_bug/config/environment.rb:5:in `<top (required)>'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/spring-1.4.0/lib/spring/application.rb:92:in `require'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/spring-1.4.0/lib/spring/application.rb:92:in `preload'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/spring-1.4.0/lib/spring/application.rb:143:in `serve'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/spring-1.4.0/lib/spring/application.rb:131:in `block in run'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/spring-1.4.0/lib/spring/application.rb:125:in `loop'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/spring-1.4.0/lib/spring/application.rb:125:in `run'
    from /Users/Nico/.rvm/gems/ruby-2.2-head/gems/spring-1.4.0/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/Nico/.rvm/rubies/ruby-2.2-head/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from -e:1:in `<main>'

I hope it will be of help!

@bf4
Copy link
Member

bf4 commented Oct 10, 2015

+100 open source points!

B mobile phone

On Oct 10, 2015, at 2:01 PM, Nicolò G. [email protected] wrote:

I've just pushed a repository with a basic app with 1 model to reproduce the error
https://github.com/nickgnd/AMS_rc3_bug

@sarjanen
Copy link
Author

#1260 solves this, a big thanks! Close now or wait for merge?

@beauby
Copy link
Contributor

beauby commented Oct 11, 2015

@Padchi Let's wait for merge and close both.

bf4 added a commit to bf4/active_model_serializers that referenced this issue Oct 15, 2015
@lcharbon
Copy link

Solved this by removing whitespace in file path.

CALLER_FILE regex does not like whitespace.

This path does not work
/application/application-Inc repos/application-api/app/serializers/item_serializer.rb

This path does
/application/application-Inc_repos/application-api/app/serializers/item_serializer.rb

@bf4
Copy link
Member

bf4 commented Oct 20, 2015

PR?

On Mon, Oct 19, 2015 at 2:45 PM, Luc Charbonneau [email protected]
wrote:

Solved this by removing a space in file path.

CALLER_FILE regex does not like whitespace.

This path does not work
/application/application-Inc
repos/application-api/app/serializers/item_serializer.rb:24:in `'

This path does
/application/application-Inc_repos/application-api/app/serializers/item_serializer.rb:24:in
`'


Reply to this email directly or view it on GitHub
#1176 (comment)
.

@beauby
Copy link
Contributor

beauby commented Oct 20, 2015

This seems consistent with @nickgnd's case (/Users/Nico/Documents/Ruby on Rails/ams_rc3_bug/app/serializers/test_serializer.rb:1:in<top (required)>'`).
@bf4 did your fix solve that?

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

10 participants