Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (47 sloc) 1.617 kb
#!/bin/bash
#Social_stream complete install
#Arguments:
#$1 --> Name of the folder to create the social_stream project
EXPECTED_ARGS=1
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: `basename $0` path/to/your/application"
exit 1
fi
#Linux packages
echo 'Installing Linux packages'
PACKAGES_COMMON='ruby ruby-dev rdoc irb libopenssl-ruby wget make curl aspell-es aspell-en libxml2-dev libxslt-dev libmagickcore-dev libmagickwand-dev libsqlite3-dev libmysqlclient-dev mysql-server rake'
PACKAGES_PRODUCTION='awstats logrotate nfs-common'
sudo apt-get install $PACKAGES_COMMON
sudo apt-get install $PACKAGES_PRODUCTION
echo 'Done'
#Rubygems
RUBY_GEMS_VERSION='1.3.7'
RUBY_GEMS_PACKAGE="rubygems-"${RUBY_GEMS_VERSION}".tgz"
RUBY_GEMS_DOWNLOAD="http://rubyforge.org/frs/download.php/70696/"${RUBY_GEMS_PACKAGE}
echo 'Installing Rubygems $RUBY_GEMS_VERSION'
cd /tmp && wget $RUBY_GEMS_DOWNLOAD
cd /tmp && tar zxf $RUBY_GEMS_PACKAGE
cd /tmp/rubygems-$RUBY_GEMS_VERSION && sudo /usr/bin/ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
echo 'Done'
#Gems
echo 'Installing Initial Gems'
sudo gem install rails
sudo gem install bundler
echo 'Done'
#Social Stream
echo 'Creating and Setting up your Social Stream basic application'
export PATH=$PATH:/var/lib/gems/1.8/bin
echo 'Creating rails project'
rails new $1
cd $1
echo 'gem "social_stream"' >> Gemfile
echo 'Updating bundle'
bundle update
echo 'Setting up the application'
rails generate social_stream:install -y
rake db:migrate
rake db:seed
echo 'Done'
echo 'Instalation complete. Run "rails server" in the application folder to start the server'
Jump to Line
Something went wrong with that request. Please try again.