Mac OS X applies .bash_profile and .profile only for Terminal.app environment and Apple's technical documentation suggests using ~/.MacOSX/environment.plist for other applications. So, by default PATH value will differ for RubyMine and the console.
We recommend to manage your environment variables using free Enviroment Variables preference pane instead of environment.plist manual editing.
Unfortunately, the "environment.plist" approach doesn't always work on MacOS < 10.6, e.g if you start RubyMine from Spotlight the environment is not applied.
Thus real solution is to set your environment variables in /etc/launchd.conf (thanks to David Goudreau for this tip). For detailed description please read Mac OS X Global Environment Variables article.
So you should:
1. Open /etc/launchd.conf file (e.g. $sudo nano /etc/launchd.conf)
2. Then set correct PATH env variable
setenv PATH /Users/romeo/.gem/ruby/1.8/bin:/opt/local/bin:/opt/local/sbin:/opt/local/libexec/git-core:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
3. Set other env variables for RubyMine if necessary
4. Save changes
P.S: If you always launch RubyMine using Dock or QuickSilver and do not use Spotlight you can install Enviroment Variables preference pane and use it instead of the manual environment.plist editing.
NB: Please don't miss "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" in the end of PATH value, because PATH=...:$PATH doesn't work here.