RubyOnRails: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „Kategorie:Framework = Installation = <pre>apt-get install ruby ruby-rails nodejs ruby-sqlite3 \ ruby-spring ruby-sass-rails ruby-uglifier ruby-coffee-rai…“)
 
Zeile 10: Zeile 10:
<pre>BASE=/home/ws/ruby
<pre>BASE=/home/ws/ruby
cd $BASE
cd $BASE
rails new demo
rails new rdbman
 
BASE=/home/ws/ruby/rdbman
cd $BASE/config
# Anpassen database.yml
cd $BASE/script
</pre>
 
== Beispiel $BASE/config/database.yml
vi database.yml
# Example:
default: &default
  adapter: postgresql
  encoding: unicode
 
development:
  adapter: postgresql
  encoding: unicode
  database: rdbman_development
  username: rubydba
  password: Geheim
 
test:
  adapter: postgresql
  encoding: unicode
  database: rdbman_test
  username: rubydba
  password: Geheim
 
production:
  adapter: postgresql
  encoding: unicode
  database: rdbman_production
  username: rubydba
  password: Geheim
</pre>
</pre>

Version vom 16. Februar 2017, 09:52 Uhr

Installation

apt-get install ruby ruby-rails nodejs ruby-sqlite3 \
  ruby-spring ruby-sass-rails ruby-uglifier ruby-coffee-rails \
  ruby-jquery-rails ruby-turbolinks ruby-jquery-turbolinks \
  ruby-jbuilder ruby-sdoc ruby-byebug ruby-web-console

Neues Projekt

BASE=/home/ws/ruby
cd $BASE
rails new rdbman

BASE=/home/ws/ruby/rdbman
cd $BASE/config
# Anpassen database.yml
cd $BASE/script

== Beispiel $BASE/config/database.yml vi database.yml

  1. Example:

default: &default

 adapter: postgresql
 encoding: unicode

development:

 adapter: postgresql
 encoding: unicode
 database: rdbman_development
 username: rubydba
 password: Geheim

test:

 adapter: postgresql
 encoding: unicode
 database: rdbman_test
 username: rubydba
 password: Geheim

production:

 adapter: postgresql
 encoding: unicode
 database: rdbman_production
 username: rubydba
 password: Geheim