-
Notifications
You must be signed in to change notification settings - Fork 119
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
Issue 109 - remove load path #113
Conversation
Remove loadpath from gemspec. Switched to using require_relative in files
@LuckDragon82 i think i might have solved the blocking issue (#114), please pull from latest master 😄 |
sweet, looks like we are unblocked and getting real errors that actually relate to loading:
|
so close 1.9.3 Does not seem to like require_relative. Any thoughts why this would only fail in 1.9.3? |
Bundler in 1.9.3 didn't like require_relative. I have no idea why. using require with path expansion worked for that one file. |
@LuckDragon82 awesome! Let's go one step further to see if this will fix #109. Can you build the gem locally, and in the Rails project where you are having the issue, set your Gemfike to reference your locally built gem for the |
We are using ruby 2.2.3 I'll see if I can get it to work using the local gem. |
before I was copying and pasting and that worked. Now I set the path in my gemfile, and that works as well! Rails console still works. Everything seems pretty good! |
Any news on if this will make it in? It would be helpful for a project I am working on. |
@LuckDragon82 sorry for the delay, just got a chance to look into this again. this might be a dumb question at this point since you've basically proved that your current approach works, but i figured i'd ask because we have a chance to get it right and follow best practice now. did you try just using |
I feel like I tried that and it didn't work, maybe that was back when travis had that bug. Anyhow it works, and it looks a lot better too! |
Scratch that its not working. I forgot to restart my server. |
|
i have a slightly different solution in mind. can you take a look at https://github.com/opentok/Opentok-Ruby-SDK/tree/issue-109, where i added one more commit on top of your changes, and if you try and it works in your Rails app, then can update your PR with that change? let me know if that makes sense, or if you have any questions. |
Guess I still have a lot to learn about load paths. That did the trick. Moving hash extensions was the ticket I guess. I wonder why it won't load it if its not in there... Thank you. |
haha to be honest, i'm no expert. i benefitted from seeing what you tried first, for sure. i'm glad we both learned something though! |
Problem
Some rails configurations were experiencing problems properly loading files as referenced issue 109
Solution
Remove loadpath from gemspec. Switched to using require_relative in files.