How can I start the initializer from the rails console?

I have a config/initializers/linkedin.rb initialization file that installs the Linkedin gem so that my application can connect to the LinkedIn service and run requests. Now I'm testing some new features, and I want to use the console for this. My problem - it’s better not to be a beginner and not to understand the console - is that I can not access the variables that are initialized in config/initializers/linkedin.rb .

Any ideas on how to use application initializers from the console so I don't have to run it manually each time?

Thanks!

+7
source share
1 answer

Try the following:

 load "#{Rails.root}/config/initializers/your_file.rb" 
+12
source

All Articles