Skip to content

Instantly share code, notes, and snippets.

@dfasolin
Created January 2, 2015 19:27
Show Gist options
  • Save dfasolin/d3a2628b87da4776e2ed to your computer and use it in GitHub Desktop.
Save dfasolin/d3a2628b87da4776e2ed to your computer and use it in GitHub Desktop.
Criando um ambiente RoR no Cloud9
# Instalando o Ruby no RVM
rvm install 2.0.0-p451
# Criando uma gemset e instalando o Rails
rvm gemset create rails_4_0_5
rvm 2.0.0-p451@gastos_rails_4_0_5 #usando a gemset com a versão do ruby instalada
gem install rails -v 4.0.5
# Verificando se tudo foi ok
ruby -v
rails -v
# Definindo a versão do Ruby e do Rails por projeto
echo 2.0.0-p451 > .ruby-version
echo rails_4_0_5 > .ruby-gemset
# De um restart no terminal para funcionar
# Instalando a gem MYSQL2
sudo apt-get install libmysqlclient-dev libmysqlclient18
gem install mysql2
# Iniciar o MySql
mysql-ctl start
# Iniciar o Interactive Shell
mysql-ctl cli
# Editar o arquivo database.yml
development:
adapter: mysql2
encoding: utf8
database: NOME_DO_SISTEMA_development
username: <%=ENV['C9_USER']%>
host: <%=ENV['IP']%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment