Last active
October 28, 2016 07:49
-
-
Save mbuffa/6058b45da3d9c76f2bd627758e0ff1b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In app/services | |
puts 'oh hey!' | |
class SomeService | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading development environment (Rails 4.1.15) | |
Frame number: 0/5 | |
[1] pry(main)> Services::SomeService | |
oh hey! | |
=> SomeService | |
[2] pry(main)> Services::SomeService | |
NameError: uninitialized constant Services::SomeService | |
from (pry):2:in `<main>' | |
[3] pry(main)> reload! | |
Reloading... | |
=> true | |
[4] pry(main)> svc = Services::SomeService.new | |
oh hey! | |
=> #<SomeService:0x007fbc1d0f9430> | |
[5] pry(main)> Services::SomeService.new | |
NameError: uninitialized constant Services::SomeService | |
from (pry):5:in `<main>' | |
[6] pry(main)> SomeService.new | |
=> #<SomeService:0x007fbc1e2b0340> | |
[7] pry(main)> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I cannot reproduce this behavior.
Where the constant
Services
come from ?