Problem with installing sqlite3-ruby

written by mikhailov on March 3rd, 2009 @ 02:14 AM

I see the problem with installing gem sqlite3-ruby. This way help me to fix it! You need to install developer headers for provide compilation the library from sources.

SQLite3:

Without the -d option, rails will default to sqlite. To install SQLite3:

~$ sudo apt-get install libsqlite3-0 libsqlite3-dev
~$ sudo gem install sqlite3-ruby 

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/ee90cf062d9741e2

Hi friends
I am new to get on the rails & I have allready a problem in installing
sqlite3-ruby.
I just made my first programme :Hello world.When I execute
http://localhost:3000/hello_world on my browser,then  the following error
comes with it.
[

no such file to load -- sqlite3

RAILS_ROOT: /home/whatsup3/HelloProject
Application Trace  | Framework
Trace| Full
Trace 

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

..........
]
After that I tried:gem install sqlite3-ruby then the folloing error comes:

[
WARNING:  Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
          /usr/bin aren't both writable.
WARNING:  You don't have /home/whatsup3/.gem/ruby/1.8/bin in your PATH,
          gem executables will not run.
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install sqlite3-ruby
checking for fdatasync() in -lrt... no
checking for sqlite3.h... no

make
make: *** No rule to make target `ruby.h', needed by `sqlite3_api_wrap.o'.
Stop.

Gem files will remain installed in
/home/whatsup3/.gem/ruby/1.8/gems/sqlite3-ruby-1.2.4 for inspection.
Results logged to
/home/whatsup3/.gem/ruby/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out
]

What should I do?
The OS is :Fedora Core 7 

Internet Explorer Free under Ubuntu Linux with VirtualBox

written by mikhailov on March 2nd, 2009 @ 05:12 AM

My job is web application development, so I have to test my projects under most popular browsers, like Firefox, Internet Explorer, Opera and Google Chrome.
Firefox, Opera, GoogleChrome work great under my Ubuntu Box, and the other once work under Wine.

*Internet Explorer*. It's pain to setup IE6 and IE7, because you can take a look of many bugs with render html and vml.

Just forget Wine for the purpose!
Microsoft give us FREE virtual PC images with IE6, IE7, IE8 aboard!
Don't you believe?

Internet Explorer Application Compatibility VPC Image
Brief Description
VPC Hard Disk Image for testing websites with different IE versions on Windows XP SP2, Windows XP SP3 and Windows Vista

IE6-XPSP3.exe 407.3 MB
IE7-VIS1.exe 700.0 MB
IE7-VIS2.rar 700.0 MB
IE7-VIS3.rar 590.5 MB
IE7-XPSP3.exe 512.0 MB
IE8RC1-XPSP3.exe 495.8 MB

Licence: Free.

www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

www.microsoft.com/downloads/details.aspx?familyid=28C97D22-6EB8-4A09-A7F7-F6C7A1F000B5&displaylang=en

After you have file downloaded, just unrar it and add select VHD file extracted earliert to VirtualBox. link

This link might be helpful to install last VirtualBox for VHD image file using.

And special present to Daniel is "Intel Pro" network adapter driver package ISO image! Just attach the file as CD-Drive image and install the Intel Pro 1000 in 2 minutes.
Download

Amazon AWS EC2 RubyOnRails Rails-All-in-one

written by mikhailov on January 29th, 2009 @ 04:27 AM

As you may know, standard template “Amazon EC2 Rails-All-in-one-trial” by Amazon AWS is not good… yeap, it is. Let me show you how fix it by your hads :)

Let’s start. We have a useful EC2 based on CentOS 5.2. Great enterprise linux for the Rails application. But Ruby 1.8.5 on aboard, it’s deeply out-of-date…

http://rubyonrails.org/download We recommend Ruby 1.8.7 for use with Rails. Ruby 1.8.6, 1.8.5, 1.8.4 and 1.8.2 are still usable too, but version 1.8.3 is not.

Well, do you want to run Rails with old Ruby? If, you have 2 ways to get newer Ruby version:

  • Ruby Enterprise edition as additional package, who need to install from sources (http://www.rubyenterpriseedition.com/download.html). Telling the truth, feel free to install it, very easy.
  • Use extra repo to the CentOS who include good version of Ruby 1.8.6 (patch 111) and other dependent libraries http://www.centos.org/modules/newbb/viewtopic.php?topic_id=1182 or followed bash scrip

    #!/bin/bash -e
    
    cat<<EOF> /etc/yum.repos.d/ruby.repo
    [ruby]
    name=ruby
    baseurl=http://repo.premiumhelp.eu/ruby/
    gpgcheck=0
    enabled=0
    EOF
    
    yum update -y
    yum --enablerepo=ruby install ruby -y
    yum --enablerepo=ruby install ruby-mysql -y
    

Apache2 httpd improving performance mod_deflate gzip

written by mikhailov on December 16th, 2008 @ 07:31 AM

How often do you think about improving performance of Apache2 httpd web-server?
“It’s too slow”, “we need more powerfull server”, etc.
Telling the truth, default settings of Apache2 aren’t good and it’s best to try optimizing those first, before thinking of more advanced solutions.

Mod_deflate in apache2 is pretty much the same as mod_gzip in apache1.3, and mod_deflate is included with the apache2 source package. Both modules allow compressing of the apache server on the fly

So, I know, professinals from Amazon EC2 AMI have optimized apache configuration file. Let me show that to site.vhost

<VirtualHost *:80>
...
# Deflate
     AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
     BrowserMatch ^Mozilla/4 gzip-only-text/html
     BrowserMatch ^Mozilla/4.0[678] no-gzip
     BrowserMatch bMSIE !no-gzip !gzip-only-text/html
     DeflateCompressionLevel 9
     SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
...
</VirtualHost>

It’s simillar to nginx settings gzip_comp_level.
So, I have Apache2 httpd with great perfomance improvement with DeflateCompressionLevel.

Custom Search