I'm having an issue with my development configuration where it seems to be unable to read environment variables on the remote SDK's server, which I use to store the database password. The error I get is this:
/home/vagrant/.rbenv/versions/2.2.2/bin/ruby -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' /home/vagrant/railsproject/bin/rails server -b 127.0.0.1 -p 3000 -e development
=> Booting Puma
=> Rails 4.2.3 application starting in development on http://127.0.0.1:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Puma 2.12.2 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://127.0.0.1:3000
Started GET "/" for 127.0.0.1 at 2015-08-01 20:39:12 +0200
Mysql2::Error (Access denied for user 'invuser'@'localhost' (using password: NO)):
mysql2 (0.3.19) lib/mysql2/client.rb:70:in `connect'
mysql2 (0.3.19) lib/mysql2/client.rb:70:in `initialize'
activerecord (4.2.3) lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
activerecord (4.2.3) lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
activerecord (4.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
activerecord (4.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
activerecord (4.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
activerecord (4.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
Which is basically telling me that my password is empty. Here is my database.yml:
password: <%= ENV['INVUSR_PASSWORD'] %>
This works fine if I launch the console or the server directly from an ssh terminal, but if I run this from Rubymine it simply won't pick up the variables. I'm assuming this is cause it's not reading .profile nor .bashrc. For reference, this is what I get on an ssh terminal:
vagrant@debian:~/railsproject$ env | grep INV
What could I be missing? Is there a way to know if Rubymine is reading either .bashrc or .profile when it connects over ssh? This is a new project, as I wanted to test rails 4.2.3. As a workaround I hardcoded the database password directly on database.yml (which is fine, since this is simply for testing).
These are some of my computer specs:
Host OS: Windows 10 Home x64.
Guest OS: Debian 8.1 (jessie)
Ruby: 2.2.2 (rbenv)