In our case, it will be After you've run a Capistrano task, RubyMine automatically creates a special profile - a temporary run/debug configuration. Open the browser and specify the application address. You can see the progress in the Run tool window Alt+4. Wait until Capistrano makes all the steps required to deploy the application. Press Ctrl twice and type cap staging deploy in the invoked popup. Unless test("[ -f #/config/master.key"Ĭommit and push changes to the remote repository.Īfter all the steps above, we are ready to deploy our Rails app to the web server. On roles(:app), in: :sequence, wait: 10 do ![]() Also, install Node.js and Yarn to manage JavaScript dependencies. Install packages required for building Ruby from sources, installing Passenger, working with SQLite, and so on. To quickly connect to your remote servers, create SSH configurations for them. In the invoked dialog, specify the web server address and credentials for your deployment user. Open the sample Rails application in RubyMine and follow the steps below.įrom the main menu, select Tools | Start SSH session. To perform the required actions on the server, we'll use the terminal emulator embedded into RubyMine. We'll use rbenv along with the ruby-build plugin to do this. In this tutorial, the web server has the sample-web-server name and has the deploy user with sudo permissions.įirst of all, we need to install the Ruby interpreter on our web server. Web server: The Ubuntu machine with enabled SSH access and Git installed. The command-line launcher will be required to specify the editor when generating credentials. Local machine: Mac with macOS, with RubyMine installed and the created command-line launcher. In this tutorial, we'll use two machines to demonstrate the application's deployment: Initial project: sample_rails_app, the master branchĬapified project: sample_rails_app, the capistrano-deploy branch You can see the initial and capified projects with the following links: As an application server, Passenger in combination with Nginx will be used. In this tutorial, we'll show you how to deploy the sample Rails application to a remote server using Capistrano. You can customize run configurations to pass specific task arguments, select the desired stage, and so on. RubyMine allows you to quickly run Capistrano tasks with double Ctrl and configure Capistrano run options using run configurations. To perform deployments, you can use predefined tasks or create custom Rake tasks. ![]() Tutorial: Deploy a Rails app using CapistranoĬapistrano is a tool for deploying applications using deployment scripts.
0 Comments
Leave a Reply. |