Is it possible I18n. Restarting the server including your proposed changed worked. Show 3 more comments. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Related Hot Network Questions. Typically you don't want your zombie. RSpec does some magic with file paths so it might be looking in the wrong spot. In your case since it lives in the same folder not recommended , you should use the format: require '. In addition to kclowes answer you can add directories to your autoload paths within the rails configuration so that they're automatically require d when Rails loads. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Rspec 'cannot load such file' Ask Question. Asked 5 years, 10 months ago. Active 2 years, 7 months ago. Viewed 9k times. As the first video describes I typed rspec --init in my project folder, which created a spec folder, in which i made a new directory called lib. Improve this question. And in ruby 1. You probably want eager loading in production. Requiring your lib explicitly, like in option 1, is akin to eager loading it, which is threadsafe.
This is a bit annoying. Your files will be autoloaded in development, and eager-loaded in production.
0コメント