Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Object doesn't support #inspect

Getting an issue when running simple tasks in the ruby console. If I run

user = User.find(10)
User Load (0.6ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", "10"], ["LIMIT", 1]]
(Object doesn't support #inspect)

I get an 'Object doesn't support #inspect' error. My colleague has the exact same branch and has no issue. On other branches I don't have this issue either. There is definitely a result as running things like this are fine.

user.first_name
=> "Tom"

I have even deleted the branch, re-downloaded but still getting the same issue. Have removed the gemfile, bundled... tried everything I know. I even turned my laptop on and off.

like image 897
bubbaspaarx Avatar asked Aug 03 '26 08:08

bubbaspaarx


1 Answers

Not necessarily a full answer to this question but we tried using the pry gem instead of IRB.

gem 'pry-rails'

Added this to our development group and now uses pry instead of irb. No issues.

Must be some sort of corruption on IRB. The version we were using was 1.3.5

like image 136
bubbaspaarx Avatar answered Aug 05 '26 09:08

bubbaspaarx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!