Permalink
Browse files

Update quickstart to use new environment variables

  • Loading branch information...
1 parent 01e4443 commit 604588338f8a8ba3be02c7bbe60a0cb6eb4c5a70 @jwhonce jwhonce committed Oct 4, 2012
Showing with 21 additions and 9 deletions.
  1. +4 −4 .openshift/action_hooks/deploy
  2. +0 −1 Gemfile
  3. +0 −1 Gemfile.lock
  4. +14 −0 README.md
  5. +3 −3 config/database.yml
@@ -6,7 +6,7 @@
set -e
-if [ -z "$OPENSHIFT_DB_HOST" ]
+if [ -z "$OPENSHIFT_MYSQL_DB_HOST" ]
then
echo 1>&2
echo "Could not find mysql database. Please run:" 1>&2
@@ -24,9 +24,9 @@ while [ $RETRY -gt 0 ] ; do
done
#check for db
- if [ -n "$OPENSHIFT_DB_HOST" ]
+ if [ -n "$OPENSHIFT_MYSQL_DB_HOST" ]
then
- echo "Database server found at $OPENSHIFT_DB_HOST. initializing..."
+ echo "Database server found at $OPENSHIFT_MYSQL_DB_HOST. initializing..."
sleep 5
break
fi
@@ -35,7 +35,7 @@ while [ $RETRY -gt 0 ] ; do
RETRY=$(( $RETRY - 1 ))
done
-if [ -z "$OPENSHIFT_DB_HOST" ]
+if [ -z "$OPENSHIFT_MYSQL_DB_HOST" ]
then
exit 5
fi
View
@@ -1,5 +1,4 @@
source 'http://mirror1.prod.rhcloud.com/mirror/ruby/'
-source 'https://rubygems.org'
gem 'rails', '3.2.6'
View
@@ -1,6 +1,5 @@
GEM
remote: http://mirror1.prod.rhcloud.com/mirror/ruby/
- remote: https://rubygems.org/
specs:
actionmailer (3.2.6)
actionpack (= 3.2.6)
View
@@ -77,6 +77,20 @@ will be the same.
rhc app create -a railsapp -t ruby-1.9
```
+ **Note:** To support Ruby 1.8,
+ ```
+ +++ config/initializers/wrap_parameters.rb
+ @@ -5,7 +5,7 @@
+
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ ActiveSupport.on_load(:action_controller) do
+ - wrap_parameters format: [:json]
+ + wrap_parameters ({:format => [:json]})
+ end
+ ```
+
+
+
1. Add mysql support to your application
```
View
@@ -16,6 +16,6 @@ production:
reconnect: false
pool: 5
database: <%=ENV['OPENSHIFT_APP_NAME']%>
- username: <%=ENV['OPENSHIFT_DB_USERNAME']%>
- password: <%=ENV['OPENSHIFT_DB_PASSWORD']%>
- socket: <%=ENV['OPENSHIFT_DB_SOCKET']%>
+ username: <%=ENV['OPENSHIFT_MYSQL_DB_USERNAME']%>
+ password: <%=ENV['OPENSHIFT_MYSQL_DB_PASSWORD']%>
+ socket: <%=ENV['OPENSHIFT_MYSQL_DB_SOCKET']%>

0 comments on commit 6045883

Please sign in to comment.