Posts

Showing posts with the label passenger

Set up Jruby with apache and passenger in EC2

How to set up jruby with apache and passenger in amazone ec2. Step 1: First install jruby using please check the current version in the   link . And make sure you are installing the bin version of it wget 'http://jruby.org.s3.amazonaws.com/downloads/1.7.4/jruby-bin-1.7.4.tar.gz' Step 2: extract the tar file using tar zxvf jruby-bin-1.7.4.tar.gz Step 3: We need to set come environment variable so that it will be accessible from every other place. export JRUBY_HOME=/home/home_directory_name/jruby-1.7.4 export PATH=$JRUBY_HOME/bin:$PATH And Open the .bashrc file and put the path in their sudo nano ~/.bashrc PATH=$PATH:/home/ubuntu/jruby-1.7.4/bin Step 4: Now to check if jruby is properly installed or not put jruby-v If your system does not have java installed then it will show an error like /home/ubuntu/jruby-1.7.4/bin/jruby: line 395: exec: java: not found Don't worry we will install java to fix this. sudo apt-get install openjdk-7-jdk apt-cache

Set up ruby 2.0 and Rails 4.0.1 in Rackspace

First we need to install ruby Step 1)Install Ruby apt-get -y update apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev cd /tmp wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz tar -xvzf ruby-2.0.0-p247.tar.gz cd ruby-2.0.0-p247/ ./configure --prefix=/usr/local make make install Step 2) Install Rails gem install rails 4.0.1 Step 3) Install passenger gem install passenger Step 4) Install Apache2 apt-get install apache2 Step 5) Install Mysql sudo apt-get install mysql-server mysql-client That's it we are done with the setup.

How to upload Bulk file in rails 3 application

If you want to upload bulk file in rails application just follow the following steps 1) create a rails application     rails new bulk_upload 2) Add passenger in your gem file     gem 'passenger' Now try to start with your rails application with the command   passenger start by default it will run on port number 3000 Now if you try to upload bulk files lets just say more than 500 mb or 800 mb you will get an error in the time of uploading like [ error] 4840#0: *557 client intended to send too large body: 94672000 bytes, client: 127.0.0.1, server: _, request: "POST /XXX HTTP/1.1", host: "localhost:3000" so this not error of you application this is the error thrown by passenger and ngnix which is responsible to run passenger First uninstall using purge to remove even configuration files and records:   apt-get purge nginx nginx-common nginx-full Then reinstall it  apt-get install nginx If above doesn't work for you you can also