Skip to main content

Fedena installation on Ubuntu(100% working)

Follow the steps from 0:

0. Install Ruby Dependancies
  • apt-get update
  • apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
1 .Install Ruby Using RVM
  • apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
  • curl -L https://get.rvm.io | bash -s stable
  • source /usr/local/rvm/scripts/rvm
  • echo "source /usr/local/rvm/scripts/rvm" >> ~/.bashrc
  • rvm install 1.8.7
  • rvm use 1.8.7 --default
  • ruby -v
Now Ruby installed so we have to install rails

2. Install Rails 2.3.5
  • gem install rails -v 2.3.5 --no-rdoc --no-ri
  • Install the remaining gems
  • gem uninstall -i /usr/local/rvm/gems/ruby-1.8.7-head@global rake
  • gem install rake -v 0.8.7
  • gem install declarative_authorization -v 0.5.1
  • gem install i18n -v 0.4.2
  • gem install mysql
  • gem install rush -v 0.6.8
  • gem update --system 1.3.7
  • gem install rmagick -v 2.16.0
3. Installing MySQL server Fedena
  • apt-get install libmysqlclient-dev mysql-server

4. Download Fedena or Copy in the folder if you already have, unzip if it is zipped.

5. Setup your database details in the database.yml

6. Now set up Fedena databases
From the Fedena source directory in the terminal run,
  • rake db:create
  • In config/initializers/ create a file abstract_mysql_adapter.rb
    paste the below code and save
      class ActiveRecord::ConnectionAdapters::MysqlAdapter
       NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
      end
  • rake db:migrate
  • rake fedena:plugins:install_all

7. Set up pdf setings
  • apt-get install wkhtmltopdf
  • cd config/initializers
  • Change wicked_pdf.rb.example file name to wicked_pdf.rb if not there.
  • cp wicked_pdf.rb.example wicked_pdf.rb
  • edit wicked_pdf.rb
  • change :wkhtmltopdf => ‘/opt/wkhtmltopdf’, to :wkhtmltopdf => ‘/usr/bin/wkhtmltopdf’,
  • save the file by pressing ctrl+O
  • and exit by pressing ctrl+X

8. Image upload settings
  • apt-get install imagemagick
  • apt-get install libmagickwand-dev

9. Setup Email
  • cd config
  • cp smtp_settings.yml.example smtp_settings.yml
configure it

10. Setup Sms
  • First of all, make your server as SMS gateway by installing software and use a gsm modem or your mobile as a gsm modem.
  • The best software you can use for SMS gateway is kannel. needs few changes to work after installation.
  • Kannel configuration can be found here
  • Add below settings in the config/sms_settings.yml
               additional_parameters: "flash=0"
               sms_settings:
                 username: Kanneluser
                 password: KannelPassword
                 sendername: Fedena
                 host_url: http://127.0.0.1:13013/cgi-bin/sendsms
                 success_code: "ok"

11. Run seed
  • rake db:seed


Run Server by following command:
$ script/server

Comments

suggestions

Popular posts from this blog

Why "F" and "L" suffix | (10.0F, 10L)

Let us take it this way, We will create their needs. So we will get why they are needed. Try to guess, which functions will be executed in the following program: public class MyClass {     public static void main(String args[]) {         MyClass obj = new MyClass();         obj.fun1(10);     }     void fun1(byte val){         System.out.println(val);     }     void fun1(int val){         System.out.println(val);     }     void fun1(float val){         System.out.println(val);     }     void fun1(long val){         System.out.println(val);     }     } It seems like every method is capable to run this program because 10 is still literal because It has no data type. Before Java, In previous technologies, this scenario gave an ambiguity error. But Java solves this problem by removing the concepts of literals. It means Java provide a data type immediately when these born. So here 10 is no more literal. Java provides Integer data type for it. So now it is of Integer t

only large files upload on S3 | Ruby On Rails

models/attachment.rb class Attachment < ApplicationRecord after_initialize :set_storage private def set_storage # larger that 5mb file would be upload on s3 if file . blob . byte_size > 5_000_000 Rails . application . config . active_storage . service = :amazon else Rails . application . config . active_storage . service = :local end end # end of private end

Typecasting | How is Long to Float Conversion possible?

We will take a brief description of Typecasting and will try to do focus on Log to Float Conversion. Typecasting: Assigning a value of one data type to another. When we assign a value of smaller data type to a bigger one. it is called Widening. Java did this conversion automatically as they are compatible. As shown in the following figure: One another kind of conversion, when automatic conversion not possible i.e. when they are not compatible is Shortening. It will be just opposite of above and diagram will be reversed. How is Long to Float Conversion possible? If we look carefully at the diagram, there is one conversion which looks questionable is Long(8 bytes) to Float(4 bytes) conversion. It looks like data lossy conversion. Actually, Type conversion does two things: Either change in range or change in behavior or both. Change in Range: short a = 3456 // this value can be varied within the range of -32768 to 32767 int b = a // now this value can be varied wi