Facebook
RSS
Showing posts with label Ubuntu tips. Show all posts
Showing posts with label Ubuntu tips. Show all posts

Install Ruby on Rails 3.1 with SQLite3 on Ubuntu 11

Using ubuntu is a bit complicated and requires patience in terms of installed software / application, but there is excess of gladness if we successfully installed. A little review about How to install Ruby on Rails 3.1 with SQLite3 on Ubuntu 11, thanks for Cicolink Blog.

This manual to install Ruby on Rails 3.1 with SQLite3 on Ubuntu 11:10 (but it is valid also for previous versions of Ubuntu 11.04, 10.10, 10.04 etc). I've chosen to install all the packages manually in a way That you can exactly know what you're installing and where.

1. INSTALL THE NEEDED LIBRARIES

Open the Synaptic Package Manager: Ubuntu 11.10 has the Unity desktop manager, you can find the Package Manager into the menu, searching for "software". If synaptic is not installed you can search it into the Ubuntu Software Center. This is the software manager (in my language):
software manager ubuntu 11


  • search and install the following packages (if they're not already installed) zlib1g, zlib1g-dev, build-essential, sqlite3, libsqlite3-dev, openssl, libssl-dev

     2.  DOWNLOAD AND INSTALL RUBY 1.9.2
  • Download the last version Ruby 1.9.2 in the "Compiling Ruby" section of the web page
  • Unzip the archive
  • Install running:
    • $  ./configure
    • $   make
    • $   sudo make install
  • Check the successful installation running ruby -v: it should answer with "ruby 1.9.2p290..."

     3.  DOWNLOAD RUBY GEM: THE STANDARD RUBY PACKAGE MANAGER
  • Download ruby gem version 1.8.10 (rubygems-1.8.10.tgz)
  • Unzip the archive somewhere
  • Put the console in the unzipped folder
  • Install running:  $  sudo ruby setup.rb 
  • Check the successful installation running gem -v: it should reply "1.8.10"

     4.  INSTALL RAILS
  • Install Rails running on the console: $  sudo gem install rails 
  • (it takes a while, don't worry)
  • Check if everything's ok using the commands "rails -v" (you should get "rails 3.1.0") or "gem list"

     5.  INSTALL SQLITE3 GEM
  • Install the sqlite3 gem running:  $  sudo gem install sqlite3

     6.  CREATE A NEW RAILS PROJECT
  • $  rails new myapp  
  • Wait a bit after the message   run  bundle install 
     7.  CREATE THE BLANK DATABASE

  • Put the console in myapp folder (cd myapp) and run:  $  rake db:create
          in order to create the databases  test.sqlite3 and development.sqlite3: (you can see them in db folder).
  • !!! If you receive some error jump to the session : 9. !! COMMON ISSUES THAT MIGHT OCCUR !!!

     8.  RUN YOUR RAILS APP

  • Put the console in myapp folder and run $  rails server
  • Open the browser
  • http://localhost:3000 
  • and you should see the Ruby on Rails: welcome page;-)
ruby on rails welcome page

I suggest you to continue the ROR learning on the official documentation, in particular on the getting started page.

     9. !! COMMON ISSUES THAT MIGHT OCCUR !!
  • Running rake db:create or rake db:migrate you could get the error: uninitialized constant Rake::DSL. The solution is to put in the first line of your Rakefile: require 'rake/dsl_definition'
  • In the browser at localhost:3000 you could get the error: "no such file to load -- openssl". The solution is to go through the installation directory of ruby: ruby-1.9.2-p180/ext/openssl and run:
                  ruby extconf.rb
                  make
                  sudo make install
  • Running rake db:create the first time could generate this error:

rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.

The error should be fixed adding in the Gemfile (in the root folder of your app) the lines:

gem 'execjs'
gem 'therubyracer'
  • and run sudo bundle
  • Put again the console in myapp folder and run:  $  rake db:create

I hope that everything went the right way,

[ Read More ]

Install canon printer driver in ubuntu

To get the canon driver in ubuntu was not so difficult, as my experience installing Canon printer in ubuntu 11.04, just plug and play into a computer and ubuntu will automatically install the drivers that we only select the drivers that are available and recommended by ubuntu, after that we just do the settings by setting the best for our printers.


If ubuntu does not automatically detect the printer driver, perform the following steps:
1. Download the driver here
2. Ekstrak file cnijfilter-mp250series-3.20-1-i386-deb.tar.gz, result folder ekstract will get two package file .deb i.e. example : Canon MP250 series driver. here the image
package canon driver mp250

3. Install both the package. The way Just click that package .deb.

4. Turn on printer canon mp258… ubuntu automatically will detect the printer, Try check in System –>administration–> Printing

canon printer in setting

5. Do the print test. you will see in setting canon printer.
test printer canon

Install Scanner

Turn off the printer first

1. First download the driver here

2. Same as when installing a printer. Extract the package and install.

3. Then open a terminal and type command :
sudo apt-get install libusb-dev build-essential

4. And then type this command in terminal :
sudo apt-get install git-core
and
git clone git://git.debian.org/sane/sane-backends.git
wait for minute while proccess running...

5. If completed, then the home folders will have folder sane-backends. Go to forlder is:
cd sane-backends
6. Now do its package configuration. by typing:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var

7. For compile the configuration, type this command in terminal :
make
wait for a while ...

8. Then type instal to install scanner :
sudo make install

9. scanners have been installed. but still there is one more. setting permissions before ... do I open gedit from the terminal.
gedit
then copy this writing below:
SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, MODE:=”0666″
SUBSYSTEM==”usb_device”,MODE:=”0666″
save in the folder "/etc/udev/rules.d" and rename file to 40-scanner-permissions.rules
10. Try to scann one picture for test.

good luck

Source : http://ab3duh.wordpress.com/
[ Read More ]

Install synaptic ubuntu 11.10 Oneiric Ocelot

Actually I have not tried ubuntu 11:10 Oneiric Ocelot  I 'm still using  ubuntu 11:04 cause still good and stable, after some time I saw a variety of sources, it turns out a lot of ubuntu 11:10 also be updated manually install eg synaptic packet manager, and he said ubuntu 11:10 Synaptic package drops from sources : http://blog.mypapit.net/2011/06/synaptic-will-not-be-inc.html.A nd several other web say that synaptic has been removed from ubuntu 11.10.

Do not worry for new linux users, because this application is not include by default.  from other sources I found that synaptic can be installed manually, source: http://www.techwith.com/2011/10/how-to-installing-synaptic-in-ubuntu.html , http://www.anotherwindowsblog.com/2011/10/a-look-at-ubuntu-11-10-oneiric-ocelot.html , http://ubuntuforums.org/showthread.php?p=11379137.

and if you would like to install it, you can install from ubuntu software center, looking for synaptic clik for install. By terminal you can install this program by type command:

sudo apt-get install synaptic

synaptic ubuntu 11.10
image source :http://saatulihsan.blogspot.com/2011/07/synaptic-removed-from-ubuntu-linux-1110.html

If the command type in above error you can try some command bellow :
sudo apt-get purge synaptic
sudo apt-get install synaptic

or this command :
gksudo synaptic
sudo apt-get remove --purge synaptic
sudo apt-get install synaptic

If you got message like :
@ubuntu it didn't work either whatever I try to get from the software center, it always shows "failed to download repository information"
This is more than likley caused by your repo mirrors being down, just open system>admin>software sources and select a different mirror

if it's not the mirror, then it's network / proxy stuff...

newhos let me know how is after twidling the software sources and running an apt-get update (should auto triger after changing sources.

A Synaptic - Ubuntu Software Center feature comparison can be found here.
[ Read More ]

Install gnome classic on ubuntu 11.10 oneiric ocelot

Ubuntu 11:10 comes with a luxurious look and charming. Unity has become the hallmark of today's Ubuntu. By leaving the interface Gnome 3 which provides limits the use of desktop effects, Ubuntu want to continue to present a sophisticated and reliable system but does not leave an element of beauty on a desktop.

Installing Gnome Classic panel is very easy in Ubuntu 11.10 oneiric ocelot. All you need is connected to the internet because it needs the installation of Gnome Classic has been provided in the Ubuntu repositories.

Please run Synaptic or use the Ubuntu Software Center if you have not installed Synaptic. In the search box, type "gnome-panel" without the quotes, and mark the package to be installed ...
ubuntu gnome 3 classic


Classic Gnome installation process will go quickly. If you want to use a text mode to install the gnome-panel, please run a terminal and type the following command line ...
sudo apt-get install gnome-panel.

Hit enter and enter your password if prompted. Give the answer by typing "y" at any prompt that is displayed until the installation is completed.

To run Gnome Classic on Ubuntu 11:10 Oneiric OCELOT that you just installed, please reboot the computer. LightDM At the login screen, click the "Gear" to display the session options, select the session "Gnome Classic". Select a user and enter the user password you will use and press enter to log into the system.
sources : http://bojalinuxer.blogspot.com
[ Read More ]

Ubuntu 11.10 'Oneiric Ocelot' has been released

For ubuntu users .. new latest ubuntu seems to have been released, I just notice that ubuntu 11.10 'Oneiric OCELOT' has been released and ready for download and users ubuntu 11.04 can directly upgrade.

The notification is :

Welcome to Ubuntu 11.10 'Oneiric Ocelot'

The Ubuntu team is proud to announce Ubuntu 11.10 'Oneiric Ocelot'.
To see what's new in this release, visit:
http://www.ubuntu.com/desktop/features
Ubuntu is a Linux distribution for your desktop or server, with a fast and easy install, regular releases, a tight selection of excellent applications installed by default, and almost any other software you can imagine available through the network.
We hope you enjoy Ubuntu.

Feedback and Helping

If you would like to help shape Ubuntu, take a look at the list of ways you can participate at
http://www.ubuntu.com/community/participate/
Your comments, bug reports, patches and suggestions will help ensure that our next release is the best release of Ubuntu ever. If you feel that you have found a bug please read:
http://help.ubuntu.com/community/ReportingBugs
Then report bugs using apport in Ubuntu. For example:
ubuntu-bug linux
will open a bug report in Launchpad regarding the linux package.
If you have a question, or if you think you may have found a bug but aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC channels on Freenode, on the Ubuntu Users mailing list, or on the Ubuntu forums:
http://help.ubuntu.com/community/InternetRelayChat
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
http://www.ubuntuforums.org/

More Information

You can find out more about Ubuntu on our website, IRC channel and wiki. If you're new to Ubuntu, please visit:
http://www.ubuntu.com/
To sign up for future Ubuntu announcements, please subscribe to Ubuntu's very low volume announcement list at:
http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce
 
You can download Ubuntu 11.10 'Oneiric Ocelot' here. 
[ Read More ]