-
Notifications
You must be signed in to change notification settings - Fork 29
How to install
You can install Mostfit by downloading the installation script from
If you have git installed and want to clone it you can continue as follow:-
git clone git://gist.github.com/915390.git
You can also manually install Mostfit by following the instructions given below:-
Follow the steps to get MOSTFIT up and running
By Ravi Shankar and Krishnan Mani
- It should be possible to run MOSTFIT pretty much anywhere one can install Ruby and connect to a MySQL server. However, setting up MOSTFIT is easiest with Ubuntu, both 8.04 LTS (Hardy Heron) and 9.10 (Karmic Koala). This HOW-TO was created from installations on Ubuntu
- MOSTFIT doesn’t need a great deal of memory or disk space. It should be possible to run it on any desktop or laptop with a decent amount of memory, even half a gig (total) should be enough
- Ruby 1.8.6+ (Ruby 1.9 is not currently supported)
- MySQL Server 5.0+
- Ruby gems package manager
- Git (to obtain the sources for MOSTFIT)
- Git repo is at: “git clone git://github.com/Mostfit/mostfit.git”
- Ruby gems package manager download (v1.3.6 at this time): http://rubyforge.org/frs/?group_id=126
- bin/rake db:create (perhaps it needs to connect as MySQL root user first in order to create the database?)
- mostfit/tasks/merb.thor/utils.rb may be missing “require ‘pathname’” (perhaps not an issue with later versions of ruby)
- Which one’s the definitive git repo for the latest source? What about stable releases?
- Install C compiler
- Install ruby
- Install MySQL, if not already available
- Install MySQL libraries for Ruby
- Install gem package manager and other Ruby stuff
- Install git, fetch the source code for MOSTFIT from github
- Create a database for MOSTFIT, and tell MOSTFIT how to find it
- Install the gems required by MOSTFIT
- Run MOSTFIT
- Get some basic development goodies (including the C compiler)
sudo aptitude install build-essential
- Get ruby
sudo aptitude install ruby sudo aptitude install ruby1.8-dev sudo aptitude install libopenssl-ruby
- (Optional, if you already have MySQL) Install MySQL server
sudo aptitude install mysql-server
- Some MySQL libraries
sudo apt-get install libmysql-ruby sudo apt-get install libmysqlclient16-dev #libmysqlclient-dev on Debian
NOTE: On Ubuntu 8.04, i had to get libmysqlclient15-dev instead
- Download and install gem
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz tar xvf rubygems-1.3.6.tgz cd rubygems-1.3.6 sudo ruby setup.rb gem -v
NOTE: i found it best to install gem from source, `gem update —system` doesn’t always work with an older gem version that you might install using apt, for example
- Some other Ruby essentials
sudo apt-get install rake sudo apt-get install ri
- Get the sources for MOSTFIT
sudo aptitude install git-core git git clone git://github.com/Mostfit/mostfit.git
- Setup the database and tell MOSTFIT how to find it
- Create the database, setup the user and permissions
- Verify you can connect as the user just created
- Edit MOSTFIT’s database configuration to point to the database(change username and password in database.yml)
mysql -u root -p mysql> create database mostfit; mysql> grant all on mostfit.* to 'mostfit_user'@'localhost' identified by 'mostfit_pass'; mysql> flush privileges; mysql> exit mysql -u mostfit_user mostfit -p mysql> show tables; mysql> exit cd mostfit/config/ cp example.database.yml database.yml emacs database.yml
Hint: At least one space is needed between a key and its value, such as “host: localhost”
- Get thor (not the God!)
sudo gem install thor -v 0.9.9 sudo gem install dm-observer -v 0.10.1
- Let MOSTFIT install bundled gems
If you use RVM, do the following first to install all the gems in the current gemset:
cd mostfit/gems/cache gem install --local *
then,
cd mostfit bin/thor merb:gem:redeploy bin/thor merb:gem:install
- Install some other gems
sudo gem install uuid sudo gem install pdf-writer sudo gem install mongrel sudo gem install log4r gem install ruby-debug #for merb -D
*NOTE: From gem1.8 onwards, gem command does not work, alias it or use gem1.8 (or whatever version of gem you have) instead
- Let MOSTFIT setup the database
cd mostfit bin/rake db:autoupgrade
NOTE: Check your database for the tables and other data that should now be created.
- Done! Run MOSTFIT
cd mostfit bin/merb
- Fire up your browser and navigate to the homepage for MOSTFIT: http://localhost:4000
NOTE: To Run Upload functionality on Local system. Need to install following gems
- sudo gem install nokogiri -v 1.4.2
- sudo gem install google-spreadsheet-ruby -v 0.1.1
Once you complete with this
create a folder named uploads in the public directory of MOSTFIT……..
DONE! You can upload excel file