ubuntu 10.04 slimy lynx or whatever it's called is the OS for a production app. I've installed rvm too, and other then being on a mac, the dev and production rubies and gems are the same.
Now, I'm used to seeing all of the bundled gems in gem list... like normal, however when i do gem list in production, I am not shown any bundled gems.
This means i can't use rails c or any other gem.
I've found out that i can do bundle exec rails c or something and use the console that way, but I'm more interested in why this is happening, and how to fix it so gem list has all the gems. it just feels right.
Thoughts?
When in development mode on your mac, the gems still get installed in the default gem path, whereas in production mode, they get installed in a folder specific to your project. Try doing a bundle show rails on each machine and you'll see what I mean.
When you run gem list it looks in the main gem folder, and since your production gems are sitting in a project-specific folder, the global gem command doesn't know to look there. So you will need to do a bundle exec to run any of those project-specific gemscommands on the server. For my purposes, I created a be alias to bundle exec. Also, to list your project's gems, you can do bundle list.
See http://gembundler.com/v1.3/rationale.html#deploying-your-application for the rationale behind this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With