Using Rails, Thin and SSL in RubyMine: The solution!

I've read a lot about how to be able to run SSL-only apps from RubyMine, and there is no general consensus on how to solve this problem. Well, I found a solution: foreman.

First add the foreman gem to your Gemfile:

    gem 'foreman'



Then create a Profile in the root of your project and put this line in:

    web: thin start --ssl


Finally, create a new Ruby Configuration with the following attributes:

  • Ruby script: This should be the path to the foreman executable. In my case, (I use RVM) here is the path: /Users/aziz/.rvm/gems/ruby-2.0.0-p247@rails_catapult/bin/foreman
  • Script arguments: start
  • Working directory: The root directory of your project, in my case: /Users/aziz/Sandbox/ruby/rails/catapult
  • In the Bundler tab, check the only checkbox
  • Finally, in the logs tab, add a new log file pointing to the development.log file in the log directory of your Rails app


And that's it. You can now run your server with SSL!

Enjoy :)





Aziz Light

0
1 comment

Procfile is misspelled as Profile.

0

Please sign in to leave a comment.