I was getting this error when I started the server. I had installed RVM, Ruby 1.9.1, Rails 3.0 Beta 4:
.rvm/gems/ruby-1.9.1-p378/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3_native.bundle: dlopen(.rvm/gems/ruby-1.9.1-p378/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3_native.bundle, 9): no suitable image found. Did find: (LoadError)
.rvm/gems/ruby-1.9.1-p378/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3_native.bundle: mach-o, but wrong architecture - .rvm/gems/ruby-1.9.1-p378/gems/sqlite3-ruby-1.3.1
/lib/sqlite3/sqlite3_native.bundle
Resolution:
Uninstall sqlite3-ruby (1.3.1)
1. gem uninstall sqlite3-ruby
Install sqlite3-ruby version 1.2.5
2. gem install sqlite3-ruby --version 1.2.5
If you get the error:
no such file to load -- sqlite3
when running rake db:migrate
Edit the Gemfile for the line sqlite3-ruby as :
gem 'sqlite3-ruby', :require => 'sqlite3'
Monday, July 12, 2010
Installing Ruby 1.9.2 using RVM on Snow Leopard
When I tried to install Ruby 1.9.2
rvm install 1.9.2
I got :
error: Error running 'make ', please check /Users/bparanj/.rvm/log/ruby-1.9.2-rc2/make*.log
error: There has been an error while running make. Aborting the installation.
Steps to Resolve :
1. Install libxml
curl -O ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz
tar zxvf libxml2-2.7.7.tar.gz
cd libxml2-2.7.7
./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3/
make &
sudo make install
2. Install libxslt
curl -O ftp://xmlsoft.org/libxslt/libxslt-1.1.26.tar.gz
tar xvzf libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure
make
sudo make install
3.
rvm install 1.9.2-head -C --enable-shared,--with-readline-dir=/opt/local,--build=x86_64-apple-darwin10
Reference:
Installing Ruby 1.9.2 with RVM on Snow Leopard
Tips:
#1 :
rvm 1.9.2-head --default
to make it 1.9.2 when you open new terminal or after reboot.
#2 :
To revert to system installed Ruby:
rvm system --default
rvm install 1.9.2
I got :
error: Error running 'make ', please check /Users/bparanj/.rvm/log/ruby-1.9.2-rc2/make*.log
error: There has been an error while running make. Aborting the installation.
Steps to Resolve :
1. Install libxml
curl -O ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz
tar zxvf libxml2-2.7.7.tar.gz
cd libxml2-2.7.7
./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3/
make &
sudo make install
2. Install libxslt
curl -O ftp://xmlsoft.org/libxslt/libxslt-1.1.26.tar.gz
tar xvzf libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure
make
sudo make install
3.
rvm install 1.9.2-head -C --enable-shared,--with-readline-dir=/opt/local,--build=x86_64-apple-darwin10
Reference:
Installing Ruby 1.9.2 with RVM on Snow Leopard
Tips:
#1 :
rvm 1.9.2-head --default
to make it 1.9.2 when you open new terminal or after reboot.
#2 :
To revert to system installed Ruby:
rvm system --default
Thursday, July 08, 2010
uninitialized constant Mysql while running rake db:create
1. Uninstall the mysql gem
bparanj$ sudo gem uninstall mysql
Successfully uninstalled mysql-2.8.1
2. Installing the gem the right way on Snow Leopard
bparanj$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
Successfully installed mysql-2.8.1
1 gem installed
3. Edit the gemfile and include the line:
gem 'mysql'
4. Run bundle install from the rails project directory:
mbp2:blog bparanj$ bundle install
Fetching source index from http://rubygems.org/
Using rake (0.8.7) from system gems
Using abstract (1.0.0) from system gems
Using activesupport (3.0.0.beta4) from system gems
Using builder (2.1.2) from system gems
Using i18n (0.4.1) from system gems
Using activemodel (3.0.0.beta4) from system gems
Using erubis (2.6.6) from bundler gems
Using rack (1.1.0) from bundler gems
Using rack-mount (0.6.6) from system gems
Using rack-test (0.5.4) from system gems
Using tzinfo (0.3.22) from system gems
Using actionpack (3.0.0.beta4) from system gems
Using mime-types (1.16) from system gems
Using polyglot (0.3.1) from system gems
Using treetop (1.4.8) from system gems
Using mail (2.2.5) from system gems
Using actionmailer (3.0.0.beta4) from system gems
Using arel (0.4.0) from system gems
Using activerecord (3.0.0.beta4) from system gems
Using activeresource (3.0.0.beta4) from system gems
Using bundler (0.9.26) from system gems
Using mysql (2.8.1) from system gems
Using thor (0.13.7) from bundler gems
Using railties (3.0.0.beta4) from system gems
Using rails (3.0.0.beta4) from system gems
Using sqlite3-ruby (1.3.0) from bundler gems
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
5. rake db:create will now work
mbp2:blog bparanj$ rake db:create
(in /Users/bparanj/projects/blog)
db/test.sqlite3 already exists
bparanj$ sudo gem uninstall mysql
Successfully uninstalled mysql-2.8.1
2. Installing the gem the right way on Snow Leopard
bparanj$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
Successfully installed mysql-2.8.1
1 gem installed
3. Edit the gemfile and include the line:
gem 'mysql'
4. Run bundle install from the rails project directory:
mbp2:blog bparanj$ bundle install
Fetching source index from http://rubygems.org/
Using rake (0.8.7) from system gems
Using abstract (1.0.0) from system gems
Using activesupport (3.0.0.beta4) from system gems
Using builder (2.1.2) from system gems
Using i18n (0.4.1) from system gems
Using activemodel (3.0.0.beta4) from system gems
Using erubis (2.6.6) from bundler gems
Using rack (1.1.0) from bundler gems
Using rack-mount (0.6.6) from system gems
Using rack-test (0.5.4) from system gems
Using tzinfo (0.3.22) from system gems
Using actionpack (3.0.0.beta4) from system gems
Using mime-types (1.16) from system gems
Using polyglot (0.3.1) from system gems
Using treetop (1.4.8) from system gems
Using mail (2.2.5) from system gems
Using actionmailer (3.0.0.beta4) from system gems
Using arel (0.4.0) from system gems
Using activerecord (3.0.0.beta4) from system gems
Using activeresource (3.0.0.beta4) from system gems
Using bundler (0.9.26) from system gems
Using mysql (2.8.1) from system gems
Using thor (0.13.7) from bundler gems
Using railties (3.0.0.beta4) from system gems
Using rails (3.0.0.beta4) from system gems
Using sqlite3-ruby (1.3.0) from bundler gems
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
5. rake db:create will now work
mbp2:blog bparanj$ rake db:create
(in /Users/bparanj/projects/blog)
db/test.sqlite3 already exists
Friday, June 25, 2010
Include Vs Extend in Ruby
Include vs Extend
Include
Classes and modules can include modules and reuse the methods defined in the module. The method in the module is available as an instance method. The constants, methods and module variables are available once the module is mixed in.
Extend
You can extend an instance of any class with module. The method in the module is available as an instance method.
The difference is extend is only applicable for that particular instance which was extended. Where as the include is applicable to any instance of the class.
Screen cast IncludeExtend.mov
Addition to IncludeExtendRuby.mov
module Talkable
def talk
p "hi"
end
end
class Foo
end
Foo.extend Talkable
Foo.talk
If extend is used on the class instead of the object, the method becomes available as class method. The extend can be used inside the class or outside the class. Refer the screencast to see how it works.
Include
Classes and modules can include modules and reuse the methods defined in the module. The method in the module is available as an instance method. The constants, methods and module variables are available once the module is mixed in.
Extend
You can extend an instance of any class with module. The method in the module is available as an instance method.
The difference is extend is only applicable for that particular instance which was extended. Where as the include is applicable to any instance of the class.
Screen cast IncludeExtend.mov
Addition to IncludeExtendRuby.mov
module Talkable
def talk
p "hi"
end
end
class Foo
end
Foo.extend Talkable
Foo.talk
If extend is used on the class instead of the object, the method becomes available as class method. The extend can be used inside the class or outside the class. Refer the screencast to see how it works.
Thursday, June 24, 2010
Upgrading Snow Leopard to Rails 3.0 Beta 4
1. gem env
should be 1.3.6 or above
2. gem update --system
Update Ruby gems to the latest version
3. sudo gem install i18n tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n bundler
Install required gems for Rails 3.0
4. sudo gem install rails --pre
Installs Rails 3.0 Beta 4
5. sudo mkdir /usr/local/lib/ruby/gems/1.9.1/gems/rails-3.0.0.beta4/lib
Create the lib directory to resolve the following error
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory - lib
should be 1.3.6 or above
2. gem update --system
Update Ruby gems to the latest version
3. sudo gem install i18n tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n bundler
Install required gems for Rails 3.0
4. sudo gem install rails --pre
Installs Rails 3.0 Beta 4
5. sudo mkdir /usr/local/lib/ruby/gems/1.9.1/gems/rails-3.0.0.beta4/lib
Create the lib directory to resolve the following error
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory - lib
Installing Ruby 1.9.2 on Snow Leopard
1)
Install Readline:
curl -O ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz
tar -xvzf readline-6.0.tar.gz
cd readline-6.0
./configure --prefix=/usr/local
make
sudo make install
I ignored the message: install: you may need to run ldconfig
2)
Install Ruby 1.9.2
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-rc1.tar.gz
tar -xvzf ruby-1.9.2-rc1.tar.gz
cd ruby-1.9.2-rc1
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
make
sudo make install
sudo make install-doc
I ignored the message: configure: WARNING: unrecognized options: --with-readline-dir
3) Update ~/.bash_profile with
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
in the last line
Open a new window and check Ruby version: ruby -v
ruby 1.9.2dev (2010-07-02 revision 28524) [x86_64-darwin10.4.0]
Install Readline:
curl -O ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz
tar -xvzf readline-6.0.tar.gz
cd readline-6.0
./configure --prefix=/usr/local
make
sudo make install
I ignored the message: install: you may need to run ldconfig
2)
Install Ruby 1.9.2
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-rc1.tar.gz
tar -xvzf ruby-1.9.2-rc1.tar.gz
cd ruby-1.9.2-rc1
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
make
sudo make install
sudo make install-doc
I ignored the message: configure: WARNING: unrecognized options: --with-readline-dir
3) Update ~/.bash_profile with
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
in the last line
Open a new window and check Ruby version: ruby -v
ruby 1.9.2dev (2010-07-02 revision 28524) [x86_64-darwin10.4.0]
Wednesday, May 05, 2010
Tracking Referrals
From Google Analytics Tracking for Mobile Apps page:
The Android 1.6 OS release supports the use of a referrer URL parameter in download links to the Android Market. The Google Analytics SDK for Android uses this parameter to automatically populate referral/campaign information in Google Analytics for your application. This enables the source of the application install to be recorded and associated with future pageviews and events.
When is Steve going to provide this feature to developers for iPhone OS?
The Android 1.6 OS release supports the use of a referrer URL parameter in download links to the Android Market. The Google Analytics SDK for Android uses this parameter to automatically populate referral/campaign information in Google Analytics for your application. This enables the source of the application install to be recorded and associated with future pageviews and events.
When is Steve going to provide this feature to developers for iPhone OS?
Thursday, April 22, 2010
How to convert .wav to .mp3
Use iTunes to import the .wav files. Go to preferences and change Import Settings -> Import Using to MP3 Encoder. Select all the .wav files to convert to .mp3 and go to Advanced -> Create mp3 version. Now just select one of the .wav file and go to "File -> Show in Finder", you will find all the converted mp3 files in the same folder.
You have to use iTunes to convert because the command line tool afconvert does not have the ability to convert to mp3.You will get the error Error: ExtAudioFileSetProperty ('cfmt') failed ('fmt?')
You have to use iTunes to convert because the command line tool afconvert does not have the ability to convert to mp3.You will get the error Error: ExtAudioFileSetProperty ('cfmt') failed ('fmt?')
Tuesday, April 20, 2010
How to view only starred emails in Gmail
Type the following in the search box and hit search:
in:Starred in:Inbox
in:Starred in:Inbox
Migraine leaves British woman speaking with Chinese accent
"I spoke to my stepdaughter on the phone from hospital and she didn't recognize who I was. She said I sounded Chinese. Since then, I have had my friends hanging up on me because they think I'm a hoax caller ... The first few weeks of the accent was quite funny, but to think I am stuck with this Chinese accent is getting me down. My voice has started to annoy me now. It is not my voice."
Learn to speak in British Accent iPhone app:
More at National Post
Learn to speak in British Accent iPhone app:
More at National Post
Monday, April 12, 2010
How to reduce caf file size
afconvert -f caff -d LEI16@22100 -c 1 ./test.mp3 ./test.caf
I kept reducing the sampling rate from 44100 to 13100. Anything below 22100 seems to affect the quality of the audio.
You can also convert a caf file with a given sampling rate to another caf file with different sampling rate:
afconvert -f caff -d LEI16@22100 -c 1 ./test.caf ./test2.caf
I kept reducing the sampling rate from 44100 to 13100. Anything below 22100 seems to affect the quality of the audio.
You can also convert a caf file with a given sampling rate to another caf file with different sampling rate:
afconvert -f caff -d LEI16@22100 -c 1 ./test.caf ./test2.caf
Tuesday, April 06, 2010
Analyzing Your App Store Sales Statistics - Part II
AppStore Sales Vs AppViz
Clearly AppViz is the winner. Provides nice charts and downloads 13 weeks of data to your desktop and provides a clear interface.
Heartbeat Signed up for this site. After I login I don't see anything. Not easy to use or figure out how to generate reports. It takes too much time than it saves. If you have a different opinion do let me know.
Tap Mini from TapMetrics. I watched the demo. It seems to allow import. I don't like the drilling into different levels to view my data.
Clearly AppViz is the winner. Provides nice charts and downloads 13 weeks of data to your desktop and provides a clear interface.
Heartbeat Signed up for this site. After I login I don't see anything. Not easy to use or figure out how to generate reports. It takes too much time than it saves. If you have a different opinion do let me know.
Tap Mini from TapMetrics. I watched the demo. It seems to allow import. I don't like the drilling into different levels to view my data.
4 ways to capitalize on Google's real-time search results
Following tips to be tested for iPhone / iPad apps that is already in the app store.
From iMedia Connection:
To take advantage of the new real-time search results -- and minimize any potential negatives -- here are four fundamental steps for marketers:
* Keep positive messages about your brand or products alive in the online news media. Issue frequent press releases with positive news about your company and create positive viral content related to your brand or product that has the potential to be mentioned frequently on popular social networking sites and even featured in news stories.
* Be active on sites like Twitter, Facebook, MySpace, FriendFeed, Jaiku, and Identi.ca. Create positive messages about your brand or products in the online social media sites likely to appear in Google results. Promote positive news stories published on mainstream news sites that result from your press releases or viral content promotions, as well as positive viral content that you created yourself.
* Maintain an active presence in social networking and microblogging sites. Cultivate relationships and interact with influential users to enlist their help in spreading your positive message. In addition, be responsive to both positive and negative mentions of your brand or product to mitigate any negative press that may occur. (Note: This is not a job for an intern. Ensure you are represented on these sites by a professional with social media and public relations savvy.)
* Closely monitor news and real-time buzz sites for mentions of your brand or product so you can react if necessary. That means setting up accounts with Google Alerts, Yahoo Keyword News Alert, and Twitter Alerts and following them.
From iMedia Connection:
To take advantage of the new real-time search results -- and minimize any potential negatives -- here are four fundamental steps for marketers:
* Keep positive messages about your brand or products alive in the online news media. Issue frequent press releases with positive news about your company and create positive viral content related to your brand or product that has the potential to be mentioned frequently on popular social networking sites and even featured in news stories.
* Be active on sites like Twitter, Facebook, MySpace, FriendFeed, Jaiku, and Identi.ca. Create positive messages about your brand or products in the online social media sites likely to appear in Google results. Promote positive news stories published on mainstream news sites that result from your press releases or viral content promotions, as well as positive viral content that you created yourself.
* Maintain an active presence in social networking and microblogging sites. Cultivate relationships and interact with influential users to enlist their help in spreading your positive message. In addition, be responsive to both positive and negative mentions of your brand or product to mitigate any negative press that may occur. (Note: This is not a job for an intern. Ensure you are represented on these sites by a professional with social media and public relations savvy.)
* Closely monitor news and real-time buzz sites for mentions of your brand or product so you can react if necessary. That means setting up accounts with Google Alerts, Yahoo Keyword News Alert, and Twitter Alerts and following them.
Monday, April 05, 2010
Analyzing Your App Store Sales Statistics
App Figures provides reporting of app sales. The graphing does not update when you change the period. Emailed the tech support. No progress has been made after a week. I do like the daily and weekly report email feature. I can set up so that all my partners get the reports emailed. The pricing seems to be reasonable: $5 / mo for 2 apps. $1.5 for each additional app that you want to track. It provides ranking of your app also.
App Sales Mobile This is available on Github. I downloaded it and ran it on Simulator. Not bad for something that is free. Nice charts and reports.
My App Sales I paid $27.70 (20 Euros) for this today. It's ok. It has lot more features. Provides data export and the option of creating html reports. I had to save the instruction to try the advanced features. The advanced features are not just one click from the app.
App Sales Mobile This is available on Github. I downloaded it and ran it on Simulator. Not bad for something that is free. Nice charts and reports.
My App Sales I paid $27.70 (20 Euros) for this today. It's ok. It has lot more features. Provides data export and the option of creating html reports. I had to save the instruction to try the advanced features. The advanced features are not just one click from the app.
Friday, April 02, 2010
How to use Active Support Rails library in Ruby scripts
#!/usr/bin/ruby
require 'rubygems'
require 'active_support/inflector'
puts Inflector.singularize('inflections')
require 'rubygems'
require 'active_support/inflector'
puts Inflector.singularize('inflections')
Thursday, April 01, 2010
British Accent Training iPad App is now live!
The first Accent Reduction training iPad app in the app store. British Accent Training is a great tool to help you learn British Accent. You can practice your accent, pronunciation and intonation.
Taught by a native British English speaker Alison Pitman. It gives you enough time to record, playback and to repeat the lesson.
The best solution is to practice with a computer. I tried a simple sound recorder on a computer as well as a tape recorder, and it did not work - too complicated, involves too much button pressing.
You need a program which plays a phrase, then records you repeating it, then repeats the native speaker, then plays your recording, and does it all over again in a loop until you are satisfied.
You can hear your mistakes and you feel that you are correcting them.
This training will allow you to record and hear your own voice. Record your voice every week you use the training to see the transformation in your accent.
The app demonstrates each pronunciation with practice words and sentences which are simple and easily understood. More content will be added in later releases. If you buy at current price you will get updates for free. When more content is included the price will go up. BUY NOW.
Taught by a native British English speaker Alison Pitman. It gives you enough time to record, playback and to repeat the lesson.
The best solution is to practice with a computer. I tried a simple sound recorder on a computer as well as a tape recorder, and it did not work - too complicated, involves too much button pressing.
You need a program which plays a phrase, then records you repeating it, then repeats the native speaker, then plays your recording, and does it all over again in a loop until you are satisfied.
You can hear your mistakes and you feel that you are correcting them.
This training will allow you to record and hear your own voice. Record your voice every week you use the training to see the transformation in your accent.
The app demonstrates each pronunciation with practice words and sentences which are simple and easily understood. More content will be added in later releases. If you buy at current price you will get updates for free. When more content is included the price will go up. BUY NOW.
Thursday, March 25, 2010
How to prepend a character to a line
sed 's/^/"/'
will prepend the double quotes to the beginning of the text. I had to copy paste the character ^ for this to work on my Mac. Could not find on the Mac keyboard.
will prepend the double quotes to the beginning of the text. I had to copy paste the character ^ for this to work on my Mac. Could not find on the Mac keyboard.
Monday, March 22, 2010
How to connect Windows XP machine to Mac Airport Extreme Wireless router
I bought a $150 PC from San Jose Salvation Army. It has 1 GB RAM, 40 GB hard drive with wireless card. This solves the headache of installing VMware, buying a licensed Windows and configuring etc.
First, make sure you are using WEP in your wireless router. Check the settings. If not, you have to change it to WEP in the router settings. It will prompt you for 13 character password. Once you change it, the router will reboot and the changes will be in effect. Now on your Windows machine just type the password (as alphanumeric characters, not as HEX) and you should be good to go.
First, make sure you are using WEP in your wireless router. Check the settings. If not, you have to change it to WEP in the router settings. It will prompt you for 13 character password. Once you change it, the router will reboot and the changes will be in effect. Now on your Windows machine just type the password (as alphanumeric characters, not as HEX) and you should be good to go.
Monday, March 15, 2010
Bladder Diary iPhone Released
Bladder Diary iPhone app will help you and your health care team figure out the causes of your bladder control trouble.
As long as you have your iPhone / iPod touch with you, you can record your bladder activity from anywhere and anytime.
Keeping a bladder diary (or "voiding diary") can help you and your doctor look for patterns to your bladder problems. You can track things like:
* How often you pass urine, and when
* How much urgency you feel each time
* Whether you're experiencing incontinence
You can keep a bladder diary before your appointment, or your doctor may ask you to start one to track your progress through treatment.
Export the data easily in a csv format that you can import to any spreadsheet, print it and take it to your doctor. You can also forward the data to your health care provider or anyone as an email.
The term OAB refers to "Over active bladder".
When you have Overactive Bladder (OAB), you may experience:
* Urgency: a pressing need to urinate. It can happen even when you don't really need to go. The urge can be so sudden and so strong that you have to run to the bathroom.
* Urge incontinence: when you can't reach the bathroom in time and you leak or have an accident.
* Frequency: having to urinate more than about 8 times a day.
* Nocturia: an urge to urinate that wakes you up at night
As long as you have your iPhone / iPod touch with you, you can record your bladder activity from anywhere and anytime.
Keeping a bladder diary (or "voiding diary") can help you and your doctor look for patterns to your bladder problems. You can track things like:
* How often you pass urine, and when
* How much urgency you feel each time
* Whether you're experiencing incontinence
You can keep a bladder diary before your appointment, or your doctor may ask you to start one to track your progress through treatment.
Export the data easily in a csv format that you can import to any spreadsheet, print it and take it to your doctor. You can also forward the data to your health care provider or anyone as an email.
The term OAB refers to "Over active bladder".
When you have Overactive Bladder (OAB), you may experience:
* Urgency: a pressing need to urinate. It can happen even when you don't really need to go. The urge can be so sudden and so strong that you have to run to the bathroom.
* Urge incontinence: when you can't reach the bathroom in time and you leak or have an accident.
* Frequency: having to urinate more than about 8 times a day.
* Nocturia: an urge to urinate that wakes you up at night
Friday, February 19, 2010
Seduction Flash Cards iPhone App
Ross Jeffries Speed Seduction(TM) Home Study Course flash cards is now available on your iPhone / iPod touch. Just swipe the flashcard to browse through 50 flash cards that consists of following themes:
1. Trance Words
2. Seduction Rules
3. Polarity Responders
4. Weasel Phrases
5. Super Influence Patterns
6. Super Weasel Phrases
Speed Seduction trademark belongs to Straight Forward Inc.
1. Trance Words
2. Seduction Rules
3. Polarity Responders
4. Weasel Phrases
5. Super Influence Patterns
6. Super Weasel Phrases
Speed Seduction trademark belongs to Straight Forward Inc.
Collectible Cook Books Price Guide iPhone App
Price for over 3800 collectible cook books is now available on your finger tips. You do not need Internet connection to use this product. Due to changing nature of the market, this is not a guarantee of prices. Choose multiple research tools to verify data.
Collectible Books Price Guide iPhone App
Price for over 3000 collectible books are now available on your finger tips. You do not need Internet connection to use this product.
Due to the changing nature of the market, this is not a guarantee of prices. Choose multiple research tools to verify data.
I developed this product for my own use. Due to difficulty in getting the pricing information fast without waiting for websites to load.
Due to the changing nature of the market, this is not a guarantee of prices. Choose multiple research tools to verify data.
I developed this product for my own use. Due to difficulty in getting the pricing information fast without waiting for websites to load.
Movies For Any Mood iPhone App
Top 20 movies for the genres : Action, Adventure, Animation, Biography, Comedy, Crime, Documentary, Drama, Family, Fantasy, Film-Noir, History, Horror, Independent, Music, Musical, Mystery, Romance, Sci-Fi, Short, Sport, TV Mini Series and Westerns of all time. Keep track of which movies you have watched. Search the entire database to see if it is in the top list.
Top 500 Movies iPhone App
The top 500 movies of the past 100 years is now available on your iPhone / iPod touch. You can keep track of which ones you have watched and which ones are still to be enjoyed. You can also search the entire database to find out whether it is in the top 500 list or not.
British Accent iPhone App
Boost your British accent to boost your career!
* Is your accent holding you back at work?
* Are you often asked to repeat yourself when you speak english?
* Do your friends and colleagues speak with a better British accent than you?
* Could improving your British accent improve your job prospects and get you that promotion?
then this product could help you!
If you are frustrated with your British accent and would like to speak with a clear RP voice then this video can help.
This product teaches you how to make the different sounds found in the RP British Accent.
* 15 different Vowel Sounds
* 16 different Consonant Sounds
By learning how to pronounce each of these individual sounds correctly you will be able to improve your spoken English immediately.
IMPRESS YOUR FRIENDS AND COLLEAGUES WITH YOUR REFINED BRITISH ACCENT
* Is your poor British accent affecting your job prospects?
* Could improving your British accent help improve your job opportunities?
For an investment of only $4.99 this product can help boost your British Accent to boost your promotion prospects.
* Is your accent holding you back at work?
* Are you often asked to repeat yourself when you speak english?
* Do your friends and colleagues speak with a better British accent than you?
* Could improving your British accent improve your job prospects and get you that promotion?
then this product could help you!
If you are frustrated with your British accent and would like to speak with a clear RP voice then this video can help.
This product teaches you how to make the different sounds found in the RP British Accent.
* 15 different Vowel Sounds
* 16 different Consonant Sounds
By learning how to pronounce each of these individual sounds correctly you will be able to improve your spoken English immediately.
IMPRESS YOUR FRIENDS AND COLLEAGUES WITH YOUR REFINED BRITISH ACCENT
* Is your poor British accent affecting your job prospects?
* Could improving your British accent help improve your job opportunities?
For an investment of only $4.99 this product can help boost your British Accent to boost your promotion prospects.
iPhone App for Kidney Stones and Gallbladder Stones
iOxalate
This application is for those who have suffered from Kidney stones or Gallbladder stones due to Calcium Oxalate stones.
Foods are categorized according to the oxalate content. Foods low in oxalate can be consumed in unlimited amounts. However, common sense needs to prevail. For example, distilled alcohol, though low in oxalate, should not be consumed in unlimited quantities.
This application helps you to follow a low oxalate diet by eliminating foods very high in oxalate and eating those with moderate oxalate content in limited amounts.
This application does not have any recipes. It only contains the names of the foods categorized by oxalate content. You can also search the entire database of foods to find its oxalate content.
* Use it in a grocery store while shopping
* To lookup the food when you are in a restaurant
* When cooking to reduce the foods high in oxalate content
This application is for those who have suffered from Kidney stones or Gallbladder stones due to Calcium Oxalate stones.
Foods are categorized according to the oxalate content. Foods low in oxalate can be consumed in unlimited amounts. However, common sense needs to prevail. For example, distilled alcohol, though low in oxalate, should not be consumed in unlimited quantities.
This application helps you to follow a low oxalate diet by eliminating foods very high in oxalate and eating those with moderate oxalate content in limited amounts.
This application does not have any recipes. It only contains the names of the foods categorized by oxalate content. You can also search the entire database of foods to find its oxalate content.
* Use it in a grocery store while shopping
* To lookup the food when you are in a restaurant
* When cooking to reduce the foods high in oxalate content
Monday, January 18, 2010
British Accent iPhone App now Live!
Learn British Accent on your iPhone / iPod touch: http://itunes.apple.com/us/app/british-accent/id350212768?mt=8
Thursday, October 15, 2009
can't convert Fixnum into String to_param
I was getting this error in to_param method. I had to explicity call to_s on id to fix it. My to_param method :
def to_param
name_slug ? "#{id.to_s}-#{name_slug.parameterize}" : id.to_s
end
If the name slug is not nil then it uses that to generate the SEO friendly URL otherwise it uses the id.
def to_param
name_slug ? "#{id.to_s}-#{name_slug.parameterize}" : id.to_s
end
If the name slug is not nil then it uses that to generate the SEO friendly URL otherwise it uses the id.
Saturday, September 19, 2009
-bash: mate:command not found
In Mac OS X 10.5.8 add the line: alias mate='open -a TextMate.app'
to your ~/.bashrc file
to your ~/.bashrc file
Thursday, September 10, 2009
Hivelogic instructions for ruby path
If which ruby shows /usr/bin/ruby instead of /usr/local/bin/ruby , it means you have not set the PATH correctly. I had to add a line: source ~/.profile to the ~/.bash_profile file. Now whenever you bring up the terminal and when you check the PATH, usr/local/bin will come before /usr/bin and the latest installed version will be picked up (which ruby will output /usr/local/bin/ruby)
Monday, August 24, 2009
Monday, August 17, 2009
Scriptaculous Rails - Complex Forms Railscasts IE fix
$($(this).parentNode).remove() works on both FF and IE.
Thursday, August 13, 2009
How to prevent the active_record output in rails console
end the statements with ; nil
Eg: list = Blog.find(:all)
list.each do |x|
puts x.title
end ; nil
Eg: list = Blog.find(:all)
list.each do |x|
puts x.title
end ; nil
Tuesday, July 21, 2009
Monday, July 20, 2009
How to dynamically insert html code with Javascript and Rails
somePage.html.erb
<%= text_field("myObjectName", "someAttribute", "onchange" => "calculateMyVar()") %>
When the user moves out of the text field, the javascript will be called.
<% if @myVar.nil? %>
<% else %>
<%= @myVar %>
<% end %>
Notice that, in order for this to work the value between the td tags is empty. If you have some dynamic output tag as shown in the else section then the javascript will not work. The above code will work for new and edit cases.
Include the following javascript within the head section of the html.erb file.
function calculateMyVar()
{
var f1 = document.getElementById('field1').value;
var f2 = document.getElementById('field2').value;
document.getElementById('myVar').innerHTML = f1 - f2
}
<%= text_field("myObjectName", "someAttribute", "onchange" => "calculateMyVar()") %>
When the user moves out of the text field, the javascript will be called.
<% if @myVar.nil? %>
<% else %>
<% end %>
Notice that, in order for this to work the value between the td tags is empty. If you have some dynamic output tag as shown in the else section then the javascript will not work. The above code will work for new and edit cases.
Include the following javascript within the head section of the html.erb file.
function calculateMyVar()
{
var f1 = document.getElementById('field1').value;
var f2 = document.getElementById('field2').value;
document.getElementById('myVar').innerHTML = f1 - f2
}
Rails Documentation Bug for Time extension
If you have a table with an attribute of type :time then to access the minutes, use min method. There is no minute or minutes method on Time extension object in ActiveSupport.
You can list all the methods available by: myActiveRecordObject.game_time.methods.sort
You can list all the methods available by: myActiveRecordObject.game_time.methods.sort
Friday, July 17, 2009
How to format date in US format in Rails
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS[:default]='%m/%d/%Y'
Thursday, July 16, 2009
How to replace space with comma in sed
test.txt :
Bugs Bunny
Daffy Duck
cat test.txt | sed -e 's/[ ]/,/g'
outputs:
Bugs, Bunny
Daffy, Duck
cat test.txt | sed -e 's/[ ]/,/g' | sed 's/$/,/'
will append comma to the end as well, so:
Bugs, Bunny,
Daffy, Duck,
Bugs Bunny
Daffy Duck
cat test.txt | sed -e 's/[ ]/,/g'
outputs:
Bugs, Bunny
Daffy, Duck
cat test.txt | sed -e 's/[ ]/,/g' | sed 's/$/,/'
will append comma to the end as well, so:
Bugs, Bunny,
Daffy, Duck,
Tuesday, April 28, 2009
Wednesday, March 04, 2009
How to load a specific version of gem
For some reason if you want to use specific version of gem installed on your system:
require 'rubygems'
gem 'activesupport', '=1.4.2'
require 'active_support'
require 'rubygems'
gem 'activesupport', '=1.4.2'
require 'active_support'
Friday, February 27, 2009
How to check if CRON service is running
You can make sure the cron service is running by running 'sudo /sbin/service crond restart'.
Thursday, February 05, 2009
Thursday, January 01, 2009
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
This error is caused if mod_ssl is not installed. On Cent OS : sudo yum install mod_ssl to get SSL working.
Tuesday, December 30, 2008
Getting MySQL to work with Rails 2.2.2 on Mac OS 10.5.6
Weird errors: dlsym(0x256ee10, Init_mysql): symbol not found - /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
It turned out I had installed the x86_64 version of MySQL and it does not work with Ruby.
[BLATANT COPY/PASTE BEGIN]
0. In Terminal: ls -l /usr/local ## Showed that mysql was pointing to a PowerPC version instead of i686
1. EXPORT ALL DATABASES FROM CURRENT MYSQL
2. Downloaded MySQL 5.1.30 (I am on OS X 10.4.11 so I used Mac OS X 10.4 (x86))
3. Ran installation package (be sure to see the README first about stopping current server, etc)
4. In Terminal: sudo gem uninstall mysql
5. In Terminal: sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
6. Started up my app's script/server
[BLATANT COPY/PASTE END]
Source: RailsForum
It turned out I had installed the x86_64 version of MySQL and it does not work with Ruby.
[BLATANT COPY/PASTE BEGIN]
0. In Terminal: ls -l /usr/local ## Showed that mysql was pointing to a PowerPC version instead of i686
1. EXPORT ALL DATABASES FROM CURRENT MYSQL
2. Downloaded MySQL 5.1.30 (I am on OS X 10.4.11 so I used Mac OS X 10.4 (x86))
3. Ran installation package (be sure to see the README first about stopping current server, etc)
4. In Terminal: sudo gem uninstall mysql
5. In Terminal: sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
6. Started up my app's script/server
[BLATANT COPY/PASTE END]
Source: RailsForum
Saturday, December 20, 2008
Captcha in Rails 2.1.2
Simple Captcha plugin by Sur Max works great. Few things that has made life easier:
1. You can now install the RMagick on Linux and Mac OS X using gem install rmagick.
2. Just follow the readme file that comes with the plugin and things will work fine.
It still is in SVN repository. It's ok, just install it.
1. You can now install the RMagick on Linux and Mac OS X using gem install rmagick.
2. Just follow the readme file that comes with the plugin and things will work fine.
It still is in SVN repository. It's ok, just install it.
Thursday, November 20, 2008
Phusion Passenger Enterprise Ruby
If you're using Phusion Passenger (http://www.modrails.com),
and you want it to use Ruby Enterprise Edition, then edit your Apache
configuration file, and change the 'PassengerRuby' option:
PassengerRuby /opt/ruby-enterprise-1.8.6-20080810/bin/ruby
If you ever want to uninstall Ruby Enterprise Edition, simply remove this
directory:
/opt/ruby-enterprise-1.8.6-20080810
and you want it to use Ruby Enterprise Edition, then edit your Apache
configuration file, and change the 'PassengerRuby' option:
PassengerRuby /opt/ruby-enterprise-1.8.6-20080810/bin/ruby
If you ever want to uninstall Ruby Enterprise Edition, simply remove this
directory:
/opt/ruby-enterprise-1.8.6-20080810
Wednesday, November 19, 2008
Tuesday, November 18, 2008
ssh keys setup - passwordless login from multiple machines
Append id_rsa.pub value in a new line (if there is already another entry) to the ~/.ssh/authorized_keys in the remote machine.
Thursday, November 06, 2008
no such file to load -- mysql (MissingSourceFile)
I followed the Hivelogic tutorial to install MySQL. I was getting that error message when I do:
sudo gem install mysql
To get this to work run:
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include
[All in one line]
sudo gem install mysql
To get this to work run:
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include
[All in one line]
Tuesday, November 04, 2008
WARNING: RubyGems 1.2+ index not found for:
RubyGems will revert to legacy indexes degrading performance.
I was getting this error message while upgrading from Rails 2.1.1 to 2.1.2. Just add github as another gem source.
1. sudo gem sources -a http://gems.github.com
2. sudo gem install rails --version 2.1.2
I was getting this error message while upgrading from Rails 2.1.1 to 2.1.2. Just add github as another gem source.
1. sudo gem sources -a http://gems.github.com
2. sudo gem install rails --version 2.1.2
Monday, November 03, 2008
Rails 2.1.1 Htmldoc 0.2.1 PDF generation
I was getting the error:
NoMethodError (undefined method `size' for false:FalseClass):
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/streaming.rb:123:in
`send_data'
Patch the file :
/usr/local/lib/ruby/gems/1.8/gems/htmldoc-0.2.1/lib/htmldoc.rb
with the following:
result.split("\n").each do |line|
+ line.strip!
Reference:
http://textmode.at/2008/5/14/ruby-htmldoc-gem-falseclass-error
NoMethodError (undefined method `size' for false:FalseClass):
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/streaming.rb:123:in
`send_data'
Patch the file :
/usr/local/lib/ruby/gems/1.8/gems/htmldoc-0.2.1/lib/htmldoc.rb
with the following:
result.split("\n").each do |line|
+ line.strip!
Reference:
http://textmode.at/2008/5/14/ruby-htmldoc-gem-falseclass-error
Wednesday, October 29, 2008
Using HTTPS in RESTful authentication Rails 2.1.1
If you get the error message:
ActionController::UnknownAction (No action responded to show):
In the sessions controller make sure you have :
ssl_required :new, :create
This will now enable https when someone logins in to the site. All other details can be easily found via Google.
ActionController::UnknownAction (No action responded to show):
In the sessions controller make sure you have :
ssl_required :new, :create
This will now enable https when someone logins in to the site. All other details can be easily found via Google.
Monday, October 27, 2008
Tagging in Rails 2.1
I had to migrate from Acts As Taggable on Steroids to Acts As Taggable On plugin to get tagging working Rails 2.1.
One migration issue is that context column that is added by this plugin will be null for old data. It must be set to 'tags' for listing tags for a given model. This will make #tag_list display all the tags for that particular model.
One migration issue is that context column that is added by this plugin will be null for old data. It must be set to 'tags' for listing tags for a given model. This will make #tag_list display all the tags for that particular model.
Wednesday, October 01, 2008
Dream Machine
I got my Mac Pro 3.2 GHz 2 processor quad core with 16 GB RAM and RAID enabled 15000 rpm SAS drive on oct 29. I am experimenting with 3 monitor setup, two 30 inch Apple Cinema displays and one Samsung 22 inch display.
Let's see how much productivity I can get from this new setup. Only gripe is the hissing noise of the fan. I don't know if it has to do with the SAS drive. I will post my setup photo on rubyplus.org soon.
Let's see how much productivity I can get from this new setup. Only gripe is the hissing noise of the fan. I don't know if it has to do with the SAS drive. I will post my setup photo on rubyplus.org soon.
Thursday, September 11, 2008
Secret to a Developer's Success
In a interview with LinuxDevCenter.com, Matz was asked the "future plans for Ruby", he replied:
loop do
read and reply mails
write code
write document/article/book
write code
end
I think this is an excellent plan to succeed for a developer who is passionate about software development.
loop do
read and reply mails
write code
write document/article/book
write code
end
I think this is an excellent plan to succeed for a developer who is passionate about software development.
Tuesday, September 09, 2008
Integrate ActiveMerchant With Rails
I read the Integrate ActiveMerchant With Rails recipe in the book Enterprise Rails Recipes by Maik Schmidt. This recipe is basically a recipe for disaster.
In a real web application the user must be taken out of the loop as soon as possible. Having a spinner spining or disabling the button or saying don't click the button is a bad design. Take Amazon for instance the user experience on the site is a good example to follow.
As soon as you create an order, you must set it's initial state and process that order in the background. You can use run rake task using a CRON job that processes the orders. What happens if the Gateway is down? What will you recover from network errors? These things happen in the real world and your software that affect the bottom line must be able to handle it.
In a real web application the user must be taken out of the loop as soon as possible. Having a spinner spining or disabling the button or saying don't click the button is a bad design. Take Amazon for instance the user experience on the site is a good example to follow.
As soon as you create an order, you must set it's initial state and process that order in the background. You can use run rake task using a CRON job that processes the orders. What happens if the Gateway is down? What will you recover from network errors? These things happen in the real world and your software that affect the bottom line must be able to handle it.
Monday, August 25, 2008
Winner of Rubyplus.org Rails Documentation Contest
There was only one entry to the contest! That entry was from a prolific Rails contributor Xavier Noria Rami. Congratulations Xavier and keep up the good work.
I will be shipping him a brand new iPhone 3g soon!
I will be shipping him a brand new iPhone 3g soon!
Wednesday, August 13, 2008
LaunchBox Unleashes Its First Nine Startups
None of those startup are likely to make any money.
Here is an idea for a startup that can make money:
How about a web app / iPhone app that users can use to check how likely they can get a room with a certain rating in a given location and date? Business travelers will find it very helpful.
Here is an idea for a startup that can make money:
How about a web app / iPhone app that users can use to check how likely they can get a room with a certain rating in a given location and date? Business travelers will find it very helpful.
Friday, August 08, 2008
Eric Hodel 3000 Logger `load_missing_constant': uninitialized constant Hodel3000CompliantLogger
Rails 2.0 configuration for Hodel 3000 logger blows up in environment.rb. Switching to RAWK. It would be cool to have a Capistrano task that shows the output.
Tuesday, July 29, 2008
Ultrasphinx on Centos
1. yum install bison
2. yum install gcc-c++
3. wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.tar.gz
4. tar xvf sphinx-x.y.z
5. cd sphinx.x.y.z
6. ./configure
7. make
8. sudo make install
You also need chronic and hpricot gems on your system.
2. yum install gcc-c++
3. wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.tar.gz
4. tar xvf sphinx-x.y.z
5. cd sphinx.x.y.z
6. ./configure
7. make
8. sudo make install
You also need chronic and hpricot gems on your system.
Tuesday, July 22, 2008
Ultrasphinx Search Engine with Rails 2.0.2
ultrasphinx: Anonymous modules have no name to be referenced by
This error is caused due to the autoloading failing to load the required Ultrasphinx files in Rails 2.0.2. The following is the fix:
1. require 'ultrasphinx/fields' in ultrasphinx/configure.rb
2.
production.conf
source episodes_main
{
html_strip = 1
}
index main
{
strip_html = 0
}
3.
In environment.rb
config.after_initialize do
Ultrasphinx::Configure.load_constants
end
Notes:
git clone git://github.com/DrMark/ultrasphinx.git vendor/plugins/ultrasphinx
rm -rf vendor/plugins/ultrasphinx/.git
This error is caused due to the autoloading failing to load the required Ultrasphinx files in Rails 2.0.2. The following is the fix:
1. require 'ultrasphinx/fields' in ultrasphinx/configure.rb
2.
production.conf
source episodes_main
{
html_strip = 1
}
index main
{
strip_html = 0
}
3.
In environment.rb
config.after_initialize do
Ultrasphinx::Configure.load_constants
end
Notes:
git clone git://github.com/DrMark/ultrasphinx.git vendor/plugins/ultrasphinx
rm -rf vendor/plugins/ultrasphinx/.git
Tuesday, July 08, 2008
How Google reinvented Ruby Hash or Protocol Buffers by Google
I was laughing out aloud when I saw the following example on Protocol Buffers:
person {
name = "John Doe"
email = "jdoe@example.com"
}
How close is it to Ruby?
person => {
name => "John Doe"
email => "jdoe@example.com"
}
person {
name = "John Doe"
email = "jdoe@example.com"
}
How close is it to Ruby?
person => {
name => "John Doe"
email => "jdoe@example.com"
}
Thursday, June 19, 2008
Tuesday, June 17, 2008
Install memcached and dependencies on Mac OS X
cd src
ls -l
curl -O http://www.monkey.org/~provos/libevent-1.4.4-stable.tar.gz
tar xvzf libevent-1.4.4-stable.tar.gz
cd libevent-1.4.4-stable
./configure --prefix=/usr/local
make
sudo make install
cd ..
ls -l
rm -rf libevent-1.4.4-stable.tar.gz
ls -l
curl -O http://danga.com/memcached/dist/memcached-1.3.0.tar.gz
tar xvzf memcached-1.3.0.tar.gz
cd memcached-1.3.0
./configure --prefix=/usr/local
make
sudo make install
I installed this on Leopard. Original script by Geoffrey Grosenbach http://nubyonrails.com
ls -l
curl -O http://www.monkey.org/~provos/libevent-1.4.4-stable.tar.gz
tar xvzf libevent-1.4.4-stable.tar.gz
cd libevent-1.4.4-stable
./configure --prefix=/usr/local
make
sudo make install
cd ..
ls -l
rm -rf libevent-1.4.4-stable.tar.gz
ls -l
curl -O http://danga.com/memcached/dist/memcached-1.3.0.tar.gz
tar xvzf memcached-1.3.0.tar.gz
cd memcached-1.3.0
./configure --prefix=/usr/local
make
sudo make install
I installed this on Leopard. Original script by Geoffrey Grosenbach http://nubyonrails.com
Thursday, June 12, 2008
How to import a new project into Google code SVN
1. Go to the root of the project
2. svn import -m "Initial checkin" . https://aoror.googlecode.com/svn/trunk/ --username bparanj
3. Accept the authentication by entering 'p'
4. Enter the Google password for your project
2. svn import -m "Initial checkin" . https://aoror.googlecode.com/svn/trunk/ --username bparanj
3. Accept the authentication by entering 'p'
4. Enter the Google password for your project
Monday, June 09, 2008
Rubyplus Featured on 15 Great Places to Find Screencasts
Josh Catone has compiled a list of 15 Great Places for Screencasts at ReadWriteWeb.
Ryan Bates is my inspiration behind the rubyplus.org site. Rubyplus site is a tool that I use to share my passion for programming with other developers. Its purpose is to ease the pain and introduce the joy of programming in Ruby to other developers. I have learned a lot from his screencasts and I am a big railscasts fan. I have met him personally at Railsconf 2008.
Ryan Bates is my inspiration behind the rubyplus.org site. Rubyplus site is a tool that I use to share my passion for programming with other developers. Its purpose is to ease the pain and introduce the joy of programming in Ruby to other developers. I have learned a lot from his screencasts and I am a big railscasts fan. I have met him personally at Railsconf 2008.
Open Closed Principle in Ruby
Most of the developers in Ruby community only know about DRY principle. There are very few who know about Open Closed Principle in Ruby.
In this episode I will explain this principle and show an example in Rails where this principle can be applied. You will learn when and how you can apply this principle in Ruby.
In this episode I will explain this principle and show an example in Rails where this principle can be applied. You will learn when and how you can apply this principle in Ruby.
Podcasting & Screencasting in Rails RailsConf 2008 Presentation
This presentation will definitely make podcasting and screencasting scary for those who want to get started.
The first few videos of my screencasts available at rubyplus.org has poor audio quality. Don't let details take away your focus.
Here's the lesson from my experience: If you're about to start something new, don't spend weeks trying to make the first attempt perfect. Get started as quickly as possible and learn as you go. Tinker, experiment and look for the big things you can tackle as you go. Solve problems when they need to be solved and you won't feel as overwhelmed by all the things that could be fixed.
Last paragraph stolen from: Solve Problems When They Need To Be Solved
The first few videos of my screencasts available at rubyplus.org has poor audio quality. Don't let details take away your focus.
Here's the lesson from my experience: If you're about to start something new, don't spend weeks trying to make the first attempt perfect. Get started as quickly as possible and learn as you go. Tinker, experiment and look for the big things you can tackle as you go. Solve problems when they need to be solved and you won't feel as overwhelmed by all the things that could be fixed.
Last paragraph stolen from: Solve Problems When They Need To Be Solved
Wednesday, May 07, 2008
Ruby Gems ERROR: could not find rush locally or in a repository
I had to do :
gem sources -r http://gems.github.com/
gem env shows:
- :sources => ["http://gems.rubyforge.org"]
gem sources -r http://gems.github.com/
gem env shows:
- :sources => ["http://gems.rubyforge.org"]
Wednesday, April 30, 2008
Why return lambda from a function?
There was an excellent question at the meetup after my presentation on why return lambda instead of the actual result from a function. I did some digging on comp.lang.ruby group. Here is highlights of the notes from that group:
> I have seen many tutorials on the Internet explaining where lambdas
> CAN be used, such as clever multiplication functions, but when are
> they actually NEEDED?
> Sure, I can take a lambda and "pass it around" so to speak, but I can
> call a function from anywhere too, right?
Sure, you can call methods from almost anywhere. But you can't pass them
around (unless you turn them into proc objects, in which case you are back to
using lambdas.) And passing them around is necessary if you didn't write (and
don't want to have to monkeypatch) all the library, etc., code from which you
may want to perform a particular task. If those libraries are written to let you
pass in proc objects, you are in good shape.
> Can somebody give me an extremely useful, NOT complicated, example of
> when lambdas are the absolute perfect solution to a problem?
Callbacks.
--------------
Every time you use a block in ruby you're using a lambda implicitly.
Implicitly, but not really. I wonder, was the original question more
like "what are blocks for?" or "yes, I know what blocks are for, but why
are there also these Proc objects, which are instantiated with the
lambda construct?"
If the latter, then one answer is: when you need the program state that
is encapsulated in a block to persist outside of the method in which it
is used. For example, this happens in event-based frameworks: a setup
method in a client class registers lambdas as event handlers; the
framework doesn't need to know the classes or methods of the client
class, hence loose coupling. As a bonus, these handlers can refer to
shared program state (local variables) in the setup method.
cache :index, :ttl => 42, :key => lambda{ request['important'] }
this is a class level method which says
"cache the index method, invalidating every 42 seconds, by using the
current request's 'important' value from the query"
note that in this cast the lambda will be instance_eval'd - so when we
say 'request' here it will ultimately mean the current request
another example:
def each &block
@list.each &block
end
here we need to have captured the calling block's scope in other to
relay it along to our internal @list object's each method. it's NOT
the case that we want the scope if the function for this lambda, what
we want is logic bound to the scope of the caller
lambda are perfect anytime you want a context sensitive result and
don't want to code everything in one massive global scope.
My problem with lambda's is that I have a hard time to find a
real use case for them. I am not sure of some use case with
lambda {} that brings a definite advantage over i.e. just
using some special object or simple method.
Technically, you can replace every lambda with
an class and an instance thereof. The difference is that
the lambda is syntactically and semantically more lightweight.
To add another example, Rake tasks store away lambdas.
my_lib_version = "1.0.2"
task :tgz do
sh "tar -czf my_lib-#{my_lib_version}.tgz lib"
end
Assuming a Ruby-like language without lambdas,
we'd get this "pure OO" Rakefile:
class TgzTask
def initialize(version)
@version = version
end
def execute
sh "tar -czf my_li...@version.tgz lib"
end
end
my_lib_version = "1.0.2"
task :tgz, TgzTask.new(my_lib_version)
All context we need in our method (local variables,
eventually the current "self") has to be explicetely
passed to the constructor, which has to initialize
our object etc. Rake would loose all its appeal.
a lambda is a special object - on that knows about every variable in
scope. have fun maintaining code that populates that object by hand ;-)
the entire point of lambdas is that the language already *has* a
scope. so, sure, you can cherry pick the required variables and
populate an object, but you can also make loops with GOTO - lambda is
merely an abstraction.
the 'definite' bit comes in because you don't HAVE to do ANYTHING.
you simply write this code
sum = 0
list.each do |i|
sum += i
end
and you don't have to write anything special, the environment is
captured, the code is evaulated in the captured context, but you don't
have to build a special summing function that take i and a sum var.
so it 'definitely' is an advantage - that is unless you don't happen
to think less code is advantageous over more...
Short answer: they are more more concise and convenient.
Ever use C++ STL? In this library a "functor" is a very important concept
(for various comparators, visiting objects, etc). You make a functor by
defining a class with a primary method for functor's functionality
("operator()"). It might also have some state (possibly maintained through
other methods) or references to things external to the functor.
In ruby, this type of thing is done with blocks and lambdas. But, it is a
lot more concise and convenient. Because blocks/lambdas have access to
variables in the scope where they are defined (which can also be used to
create state), there shouldn't be a need to create dedicated "functor"
classes.
One main use is precisely when you don't need to pass anything around - you
need a one-off function, and probably the function isn't particularly
complicated. Typical examples are when supplying a code block to a sort,
group, map or filter function.
Are they needed? No. But then again, neither are subroutines or modules or
for loops...
the lambda expression came from the lisp community, it's kind of
abstraction of procedures.
in oo languages it's usually difficult to extend methods than extend
data structures.
ruby or other modern programming languages did a great job to mix them together.
well , back to the topic, imo to fully understand the power of
lambda(or abstraction), one has to look into the lisp/scheme world :)
Lambda comes from lambda calculus. The fact that LISP uses them is just a
happy coincidence.
But let's compare LISP and Ruby for a moment.
In LISP, any time you want to pass an unnamed ad-hoc function to another
function, you define it like (lambda (var1 var2) (code)), so you wind up
using the lambda macro a lot. You might have
(mapcar #'(lambda (x) (* x x)) '(1 2 3 4))
which returns
(1 4 9 16)
In Ruby, you do this kind of thing a lot too. Only we have syntactic
sugar that makes things a little nicer in many cases. The equivalent code
to the LISP example is
[1 2 3 4].map{|x| x*x}
so you just used a lambda, but didn't have to type the keyword.
There's one thing to know though. Kernel#proc and Kernel#lambda have
slightly different semantics when it comes to the return, next, and break
keywords. Kernel#lambda does things one way, and Kernel#proc or a bare
block do things the other way. So really, Ruby uses lambdas a lot (maybe
even more than LISP) but we just don't use the term very much, mostly
because we've shortened the syntax.
I like to use them when I have to efficiently choose an algorithm based
on some value:
algos = {
"print" => lambda {|x| puts x},
"ignore" => lambda {|x| },
"log" => lambda {|x| File.open("log","w") {|io| io.puts x}},
}
Now you can efficiently call a function based on some input
...each do |x,y|
algos[x][y]
end
Yes, I know the example is artificial and yes, you can do it with an
object and #send as well. But if keys are not Strings or have different
types then this approach is simpler.
Here is the link to the actual thread : http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/643980216d5c3356/2d0af8f6eabf9fb3?lnk=gst&q=proc#2d0af8f6eabf9fb3
> I have seen many tutorials on the Internet explaining where lambdas
> CAN be used, such as clever multiplication functions, but when are
> they actually NEEDED?
> Sure, I can take a lambda and "pass it around" so to speak, but I can
> call a function from anywhere too, right?
Sure, you can call methods from almost anywhere. But you can't pass them
around (unless you turn them into proc objects, in which case you are back to
using lambdas.) And passing them around is necessary if you didn't write (and
don't want to have to monkeypatch) all the library, etc., code from which you
may want to perform a particular task. If those libraries are written to let you
pass in proc objects, you are in good shape.
> Can somebody give me an extremely useful, NOT complicated, example of
> when lambdas are the absolute perfect solution to a problem?
Callbacks.
--------------
Every time you use a block in ruby you're using a lambda implicitly.
Implicitly, but not really. I wonder, was the original question more
like "what are blocks for?" or "yes, I know what blocks are for, but why
are there also these Proc objects, which are instantiated with the
lambda construct?"
If the latter, then one answer is: when you need the program state that
is encapsulated in a block to persist outside of the method in which it
is used. For example, this happens in event-based frameworks: a setup
method in a client class registers lambdas as event handlers; the
framework doesn't need to know the classes or methods of the client
class, hence loose coupling. As a bonus, these handlers can refer to
shared program state (local variables) in the setup method.
cache :index, :ttl => 42, :key => lambda{ request['important'] }
this is a class level method which says
"cache the index method, invalidating every 42 seconds, by using the
current request's 'important' value from the query"
note that in this cast the lambda will be instance_eval'd - so when we
say 'request' here it will ultimately mean the current request
another example:
def each &block
@list.each &block
end
here we need to have captured the calling block's scope in other to
relay it along to our internal @list object's each method. it's NOT
the case that we want the scope if the function for this lambda, what
we want is logic bound to the scope of the caller
lambda are perfect anytime you want a context sensitive result and
don't want to code everything in one massive global scope.
My problem with lambda's is that I have a hard time to find a
real use case for them. I am not sure of some use case with
lambda {} that brings a definite advantage over i.e. just
using some special object or simple method.
Technically, you can replace every lambda with
an class and an instance thereof. The difference is that
the lambda is syntactically and semantically more lightweight.
To add another example, Rake tasks store away lambdas.
my_lib_version = "1.0.2"
task :tgz do
sh "tar -czf my_lib-#{my_lib_version}.tgz lib"
end
Assuming a Ruby-like language without lambdas,
we'd get this "pure OO" Rakefile:
class TgzTask
def initialize(version)
@version = version
end
def execute
sh "tar -czf my_li...@version.tgz lib"
end
end
my_lib_version = "1.0.2"
task :tgz, TgzTask.new(my_lib_version)
All context we need in our method (local variables,
eventually the current "self") has to be explicetely
passed to the constructor, which has to initialize
our object etc. Rake would loose all its appeal.
a lambda is a special object - on that knows about every variable in
scope. have fun maintaining code that populates that object by hand ;-)
the entire point of lambdas is that the language already *has* a
scope. so, sure, you can cherry pick the required variables and
populate an object, but you can also make loops with GOTO - lambda is
merely an abstraction.
the 'definite' bit comes in because you don't HAVE to do ANYTHING.
you simply write this code
sum = 0
list.each do |i|
sum += i
end
and you don't have to write anything special, the environment is
captured, the code is evaulated in the captured context, but you don't
have to build a special summing function that take i and a sum var.
so it 'definitely' is an advantage - that is unless you don't happen
to think less code is advantageous over more...
Short answer: they are more more concise and convenient.
Ever use C++ STL? In this library a "functor" is a very important concept
(for various comparators, visiting objects, etc). You make a functor by
defining a class with a primary method for functor's functionality
("operator()"). It might also have some state (possibly maintained through
other methods) or references to things external to the functor.
In ruby, this type of thing is done with blocks and lambdas. But, it is a
lot more concise and convenient. Because blocks/lambdas have access to
variables in the scope where they are defined (which can also be used to
create state), there shouldn't be a need to create dedicated "functor"
classes.
One main use is precisely when you don't need to pass anything around - you
need a one-off function, and probably the function isn't particularly
complicated. Typical examples are when supplying a code block to a sort,
group, map or filter function.
Are they needed? No. But then again, neither are subroutines or modules or
for loops...
the lambda expression came from the lisp community, it's kind of
abstraction of procedures.
in oo languages it's usually difficult to extend methods than extend
data structures.
ruby or other modern programming languages did a great job to mix them together.
well , back to the topic, imo to fully understand the power of
lambda(or abstraction), one has to look into the lisp/scheme world :)
Lambda comes from lambda calculus. The fact that LISP uses them is just a
happy coincidence.
But let's compare LISP and Ruby for a moment.
In LISP, any time you want to pass an unnamed ad-hoc function to another
function, you define it like (lambda (var1 var2) (code)), so you wind up
using the lambda macro a lot. You might have
(mapcar #'(lambda (x) (* x x)) '(1 2 3 4))
which returns
(1 4 9 16)
In Ruby, you do this kind of thing a lot too. Only we have syntactic
sugar that makes things a little nicer in many cases. The equivalent code
to the LISP example is
[1 2 3 4].map{|x| x*x}
so you just used a lambda, but didn't have to type the keyword.
There's one thing to know though. Kernel#proc and Kernel#lambda have
slightly different semantics when it comes to the return, next, and break
keywords. Kernel#lambda does things one way, and Kernel#proc or a bare
block do things the other way. So really, Ruby uses lambdas a lot (maybe
even more than LISP) but we just don't use the term very much, mostly
because we've shortened the syntax.
I like to use them when I have to efficiently choose an algorithm based
on some value:
algos = {
"print" => lambda {|x| puts x},
"ignore" => lambda {|x| },
"log" => lambda {|x| File.open("log","w") {|io| io.puts x}},
}
Now you can efficiently call a function based on some input
...each do |x,y|
algos[x][y]
end
Yes, I know the example is artificial and yes, you can do it with an
object and #send as well. But if keys are not Strings or have different
types then this approach is simpler.
Here is the link to the actual thread : http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/643980216d5c3356/2d0af8f6eabf9fb3?lnk=gst&q=proc#2d0af8f6eabf9fb3
Saturday, April 12, 2008
Changing the transparency of terminal in Mac OS Leopard
Go to Terminal -> Preferences, Window tab, Background Color and change the opacity to whatever you like. The window will change as you change the percentage of opacity.
make: yacc: Command not found on CentOS
When I was installing monit on CentOS 5, I got that error message when make was executed. The solution is to install byacc:
yum install byacc
yum install byacc
Thursday, April 10, 2008
How to install Mongrel on CentOS 5
If you dont' have ruby-devel installed you will get the following error:
can't find header files for ruby
yum install ruby-devel
gem install mongrel
[root@rubyplus rubygems-1.1.0]# yum install -y postfix
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postfix to pack into transaction set.
postfix-2.3.3-2.i386.rpm 100% |=========================| 41 kB 00:00
---> Package postfix.i386 2:2.3.3-2 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
postfix i386 2:2.3.3-2 base 3.6 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.6 M
Downloading Packages:
(1/1): postfix-2.3.3-2.i3 100% |=========================| 3.6 MB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix ######################### [1/1]
Installed: postfix.i386 2:2.3.3-2
Complete!
[root@rubyplus rubygems-1.1.0]# chkconfig postfix on
[root@rubyplus rubygems-1.1.0]# mysqladmin -u root password 'esterc500mg'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@rubyplus rubygems-1.1.0]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# which mysql
/usr/bin/mysql
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysqladmin -uroot
/usr/bin/mysqladmin Ver 8.41 Distrib 5.0.22, for redhat-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Administration program for the mysqld daemon.
Usage: /usr/bin/mysqladmin [OPTIONS] command command....
-c, --count=# Number of iterations to make. This works with -i
(--sleep) only.
-#, --debug[=name] Output debug log. Often this is 'd:t:o,filename'.
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs.
-C, --compress Use compression in server/client protocol.
--character-sets-dir=name
Directory where character sets are.
--default-character-set=name
Set the default character set.
-?, --help Display this help and exit.
-h, --host=name Connect to host.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-P, --port=# Port number to use for connection.
--protocol=name The protocol of connection (tcp,socket,pipe,memory).
-r, --relative Show difference between current and previous values when
used with -i. Currently works only with extended-status.
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated; you can set variables directly with
--variable-name=value.
-s, --silent Silently exit if one can't connect to server.
-S, --socket=name Socket file to use for connection.
-i, --sleep=# Execute commands again and again with a sleep between.
--ssl Enable SSL for connection (automatically enabled with
other flags). Disable with --skip-ssl.
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
-u, --user=name User for login if not current user.
-v, --verbose Write more information.
-V, --version Output version information and exit.
-E, --vertical Print output vertically. Is similar to --relative, but
prints output vertically.
-w, --wait[=#] Wait and retry if connection is down.
--connect_timeout=#
--shutdown_timeout=#
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
count 0
force FALSE
compress FALSE
character-sets-dir (No default value)
default-character-set (No default value)
host (No default value)
port 0
relative FALSE
socket (No default value)
sleep 0
ssl FALSE
ssl-key (No default value)
ssl-cert (No default value)
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cipher (No default value)
user root
verbose FALSE
vertical FALSE
connect_timeout 43200
shutdown_timeout 3600
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf /etc/my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read
Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
debug Instruct server to write debug information to log
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
flush-hosts Flush all cached hosts
flush-logs Flush all logs
flush-status Clear status variables
flush-tables Flush all tables
flush-threads Flush the thread cache
flush-privileges Reload grant tables (same as reload)
kill id,id,... Kill mysql threads
password new-password Change old password to new-password, MySQL 4.1 hashing.
old-password new-password Change old password to new-password in old format.
ping Check if mysqld is alive
processlist Show list of active threads in server
reload Reload grant tables
refresh Flush all tables and close and open logfiles
shutdown Take server down
status Gives a short status message from the server
start-slave Start slave
stop-slave Stop slave
variables Prints variables available
version Get version info from server
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# sudo gem install rails -y
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rake-0.8.1
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
7 gems installed
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.0.2...
Installing RDoc documentation for activerecord-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...
Installing RDoc documentation for activeresource-2.0.2...
[root@rubyplus rubygems-1.1.0]# sudo gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install mongrel
can't find header files for ruby.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out
[root@rubyplus rubygems-1.1.0]#
can't find header files for ruby
yum install ruby-devel
gem install mongrel
[root@rubyplus rubygems-1.1.0]# yum install -y postfix
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postfix to pack into transaction set.
postfix-2.3.3-2.i386.rpm 100% |=========================| 41 kB 00:00
---> Package postfix.i386 2:2.3.3-2 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
postfix i386 2:2.3.3-2 base 3.6 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.6 M
Downloading Packages:
(1/1): postfix-2.3.3-2.i3 100% |=========================| 3.6 MB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix ######################### [1/1]
Installed: postfix.i386 2:2.3.3-2
Complete!
[root@rubyplus rubygems-1.1.0]# chkconfig postfix on
[root@rubyplus rubygems-1.1.0]# mysqladmin -u root password 'esterc500mg'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@rubyplus rubygems-1.1.0]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# which mysql
/usr/bin/mysql
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysqladmin -uroot
/usr/bin/mysqladmin Ver 8.41 Distrib 5.0.22, for redhat-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Administration program for the mysqld daemon.
Usage: /usr/bin/mysqladmin [OPTIONS] command command....
-c, --count=# Number of iterations to make. This works with -i
(--sleep) only.
-#, --debug[=name] Output debug log. Often this is 'd:t:o,filename'.
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs.
-C, --compress Use compression in server/client protocol.
--character-sets-dir=name
Directory where character sets are.
--default-character-set=name
Set the default character set.
-?, --help Display this help and exit.
-h, --host=name Connect to host.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-P, --port=# Port number to use for connection.
--protocol=name The protocol of connection (tcp,socket,pipe,memory).
-r, --relative Show difference between current and previous values when
used with -i. Currently works only with extended-status.
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated; you can set variables directly with
--variable-name=value.
-s, --silent Silently exit if one can't connect to server.
-S, --socket=name Socket file to use for connection.
-i, --sleep=# Execute commands again and again with a sleep between.
--ssl Enable SSL for connection (automatically enabled with
other flags). Disable with --skip-ssl.
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
-u, --user=name User for login if not current user.
-v, --verbose Write more information.
-V, --version Output version information and exit.
-E, --vertical Print output vertically. Is similar to --relative, but
prints output vertically.
-w, --wait[=#] Wait and retry if connection is down.
--connect_timeout=#
--shutdown_timeout=#
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
count 0
force FALSE
compress FALSE
character-sets-dir (No default value)
default-character-set (No default value)
host (No default value)
port 0
relative FALSE
socket (No default value)
sleep 0
ssl FALSE
ssl-key (No default value)
ssl-cert (No default value)
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cipher (No default value)
user root
verbose FALSE
vertical FALSE
connect_timeout 43200
shutdown_timeout 3600
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf /etc/my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read
Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
debug Instruct server to write debug information to log
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
flush-hosts Flush all cached hosts
flush-logs Flush all logs
flush-status Clear status variables
flush-tables Flush all tables
flush-threads Flush the thread cache
flush-privileges Reload grant tables (same as reload)
kill id,id,... Kill mysql threads
password new-password Change old password to new-password, MySQL 4.1 hashing.
old-password new-password Change old password to new-password in old format.
ping Check if mysqld is alive
processlist Show list of active threads in server
reload Reload grant tables
refresh Flush all tables and close and open logfiles
shutdown Take server down
status Gives a short status message from the server
start-slave Start slave
stop-slave Stop slave
variables Prints variables available
version Get version info from server
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# sudo gem install rails -y
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rake-0.8.1
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
7 gems installed
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.0.2...
Installing RDoc documentation for activerecord-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...
Installing RDoc documentation for activeresource-2.0.2...
[root@rubyplus rubygems-1.1.0]# sudo gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install mongrel
can't find header files for ruby.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out
[root@rubyplus rubygems-1.1.0]#
Installation notes
[root@rubyplus rubygems-1.1.0]# yum install -y postfix
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postfix to pack into transaction set.
postfix-2.3.3-2.i386.rpm 100% |=========================| 41 kB 00:00
---> Package postfix.i386 2:2.3.3-2 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
postfix i386 2:2.3.3-2 base 3.6 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.6 M
Downloading Packages:
(1/1): postfix-2.3.3-2.i3 100% |=========================| 3.6 MB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix ######################### [1/1]
Installed: postfix.i386 2:2.3.3-2
Complete!
[root@rubyplus rubygems-1.1.0]# chkconfig postfix on
[root@rubyplus rubygems-1.1.0]# mysqladmin -u root password 'new_password_here'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@rubyplus rubygems-1.1.0]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# which mysql
/usr/bin/mysql
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysqladmin -uroot
/usr/bin/mysqladmin Ver 8.41 Distrib 5.0.22, for redhat-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Administration program for the mysqld daemon.
Usage: /usr/bin/mysqladmin [OPTIONS] command command....
-c, --count=# Number of iterations to make. This works with -i
(--sleep) only.
-#, --debug[=name] Output debug log. Often this is 'd:t:o,filename'.
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs.
-C, --compress Use compression in server/client protocol.
--character-sets-dir=name
Directory where character sets are.
--default-character-set=name
Set the default character set.
-?, --help Display this help and exit.
-h, --host=name Connect to host.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-P, --port=# Port number to use for connection.
--protocol=name The protocol of connection (tcp,socket,pipe,memory).
-r, --relative Show difference between current and previous values when
used with -i. Currently works only with extended-status.
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated; you can set variables directly with
--variable-name=value.
-s, --silent Silently exit if one can't connect to server.
-S, --socket=name Socket file to use for connection.
-i, --sleep=# Execute commands again and again with a sleep between.
--ssl Enable SSL for connection (automatically enabled with
other flags). Disable with --skip-ssl.
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
-u, --user=name User for login if not current user.
-v, --verbose Write more information.
-V, --version Output version information and exit.
-E, --vertical Print output vertically. Is similar to --relative, but
prints output vertically.
-w, --wait[=#] Wait and retry if connection is down.
--connect_timeout=#
--shutdown_timeout=#
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
count 0
force FALSE
compress FALSE
character-sets-dir (No default value)
default-character-set (No default value)
host (No default value)
port 0
relative FALSE
socket (No default value)
sleep 0
ssl FALSE
ssl-key (No default value)
ssl-cert (No default value)
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cipher (No default value)
user root
verbose FALSE
vertical FALSE
connect_timeout 43200
shutdown_timeout 3600
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf /etc/my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read
Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
debug Instruct server to write debug information to log
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
flush-hosts Flush all cached hosts
flush-logs Flush all logs
flush-status Clear status variables
flush-tables Flush all tables
flush-threads Flush the thread cache
flush-privileges Reload grant tables (same as reload)
kill id,id,... Kill mysql threads
password new-password Change old password to new-password, MySQL 4.1 hashing.
old-password new-password Change old password to new-password in old format.
ping Check if mysqld is alive
processlist Show list of active threads in server
reload Reload grant tables
refresh Flush all tables and close and open logfiles
shutdown Take server down
status Gives a short status message from the server
start-slave Start slave
stop-slave Stop slave
variables Prints variables available
version Get version info from server
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# sudo gem install rails -y
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rake-0.8.1
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
7 gems installed
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.0.2...
Installing RDoc documentation for activerecord-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...
Installing RDoc documentation for activeresource-2.0.2...
[root@rubyplus rubygems-1.1.0]# sudo gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install mongrel
can't find header files for ruby.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out
[root@rubyplus rubygems-1.1.0]#
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postfix to pack into transaction set.
postfix-2.3.3-2.i386.rpm 100% |=========================| 41 kB 00:00
---> Package postfix.i386 2:2.3.3-2 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
postfix i386 2:2.3.3-2 base 3.6 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.6 M
Downloading Packages:
(1/1): postfix-2.3.3-2.i3 100% |=========================| 3.6 MB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix ######################### [1/1]
Installed: postfix.i386 2:2.3.3-2
Complete!
[root@rubyplus rubygems-1.1.0]# chkconfig postfix on
[root@rubyplus rubygems-1.1.0]# mysqladmin -u root password 'new_password_here'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@rubyplus rubygems-1.1.0]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# which mysql
/usr/bin/mysql
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysqladmin -uroot
/usr/bin/mysqladmin Ver 8.41 Distrib 5.0.22, for redhat-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Administration program for the mysqld daemon.
Usage: /usr/bin/mysqladmin [OPTIONS] command command....
-c, --count=# Number of iterations to make. This works with -i
(--sleep) only.
-#, --debug[=name] Output debug log. Often this is 'd:t:o,filename'.
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs.
-C, --compress Use compression in server/client protocol.
--character-sets-dir=name
Directory where character sets are.
--default-character-set=name
Set the default character set.
-?, --help Display this help and exit.
-h, --host=name Connect to host.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-P, --port=# Port number to use for connection.
--protocol=name The protocol of connection (tcp,socket,pipe,memory).
-r, --relative Show difference between current and previous values when
used with -i. Currently works only with extended-status.
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated; you can set variables directly with
--variable-name=value.
-s, --silent Silently exit if one can't connect to server.
-S, --socket=name Socket file to use for connection.
-i, --sleep=# Execute commands again and again with a sleep between.
--ssl Enable SSL for connection (automatically enabled with
other flags). Disable with --skip-ssl.
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
-u, --user=name User for login if not current user.
-v, --verbose Write more information.
-V, --version Output version information and exit.
-E, --vertical Print output vertically. Is similar to --relative, but
prints output vertically.
-w, --wait[=#] Wait and retry if connection is down.
--connect_timeout=#
--shutdown_timeout=#
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
count 0
force FALSE
compress FALSE
character-sets-dir (No default value)
default-character-set (No default value)
host (No default value)
port 0
relative FALSE
socket (No default value)
sleep 0
ssl FALSE
ssl-key (No default value)
ssl-cert (No default value)
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cipher (No default value)
user root
verbose FALSE
vertical FALSE
connect_timeout 43200
shutdown_timeout 3600
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf /etc/my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read
Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
debug Instruct server to write debug information to log
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
flush-hosts Flush all cached hosts
flush-logs Flush all logs
flush-status Clear status variables
flush-tables Flush all tables
flush-threads Flush the thread cache
flush-privileges Reload grant tables (same as reload)
kill id,id,... Kill mysql threads
password new-password Change old password to new-password, MySQL 4.1 hashing.
old-password new-password Change old password to new-password in old format.
ping Check if mysqld is alive
processlist Show list of active threads in server
reload Reload grant tables
refresh Flush all tables and close and open logfiles
shutdown Take server down
status Gives a short status message from the server
start-slave Start slave
stop-slave Stop slave
variables Prints variables available
version Get version info from server
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# /usr/bin/mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@rubyplus rubygems-1.1.0]# sudo gem install rails -y
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rake-0.8.1
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
7 gems installed
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.0.2...
Installing RDoc documentation for activerecord-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...
Installing RDoc documentation for activeresource-2.0.2...
[root@rubyplus rubygems-1.1.0]# sudo gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install mongrel
can't find header files for ruby.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out
[root@rubyplus rubygems-1.1.0]#
rubygems 1.1.0 on CentOS 5
ruby setup.rb
./lib/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError)
from ./lib/rubygems/custom_require.rb:27:in `require'
from setup.rb:48
Rubygems is retarded, it will puke until you install ruby-rdoc and rdoc to install the rubygems 1.1
yum install ruby-rdoc
Download rubygems
wget http://rubyforge.org/frs/download.php/34638/rubygems-1.1.0.tgz
cd rubygems-1.1.0.tgz
Extract
tar -xvzf rubygems-1.1.0.tgz
ruby setup.rb
./lib/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError)
from ./lib/rubygems/custom_require.rb:27:in `require'
from setup.rb:48
Rubygems is retarded, it will puke until you install ruby-rdoc and rdoc to install the rubygems 1.1
yum install ruby-rdoc
Download rubygems
wget http://rubyforge.org/frs/download.php/34638/rubygems-1.1.0.tgz
cd rubygems-1.1.0.tgz
Extract
tar -xvzf rubygems-1.1.0.tgz
ruby setup.rb
Installing Nginx on CentOS 5
[root@rubyplus etc]# yum install pcre
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for pcre to pack into transaction set.
pcre-6.6-2.el5_1.7.i386.r 100% |=========================| 7.4 kB 00:00
---> Package pcre.i386 0:6.6-2.el5_1.7 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
pcre i386 6.6-2.el5_1.7 updates 112 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 112 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): pcre-6.6-2.el5_1.7.i386.rpm 112 kB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : pcre ######################### [1/2]
Cleanup : pcre ######################### [2/2]
Updated: pcre.i386 0:6.6-2.el5_1.7
Complete!
[root@rubyplus etc]# yum install pcre-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for pcre-devel to pack into transaction set.
pcre-devel-6.6-2.el5_1.7. 100% |=========================| 10 kB 00:00
---> Package pcre-devel.i386 0:6.6-2.el5_1.7 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
pcre-devel i386 6.6-2.el5_1.7 updates 176 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 176 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): pcre-devel-6.6-2.el5_1.7.i386.rpm 176 kB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: pcre-devel ######################### [1/1]
Installed: pcre-devel.i386 0:6.6-2.el5_1.7
Complete!
[root@rubyplus etc]# yum install zlib
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install zlib-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install openssl
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install openssl-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with
-http_sub_module --with-http_dav_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-cc-opt="-I /usr/include/pcre" --pid-path=/var/run/ngin
x.pid --lock-path=/var/lock/subsys/nginx --conf-path=/etc/nginx/nginx.conf
-bash: ./configure: No such file or directory
[root@rubyplus etc]#
[root@rubyplus etc]# wget http://sysoev.ru/nginx/nginx-0.5.35.tar.gz
--12:44:58-- http://sysoev.ru/nginx/nginx-0.5.35.tar.gz
Resolving sysoev.ru... 81.19.69.70
Connecting to sysoev.ru|81.19.69.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 488926 (477K) [application/octet-stream]
Saving to: `nginx-0.5.35.tar.gz'
100%[===============================================================================================================================>] 488,926 48.7K/s in 9.3s
12:45:08 (51.3 KB/s) - `nginx-0.5.35.tar.gz' saved [488926/488926]
[root@rubyplus etc]# tar xzvf nginx-0.5.35.tar.gz
nginx-0.5.35/
nginx-0.5.35/contrib/unicode2nginx/koi-utf
[root@rubyplus etc]# cd nginx-0.5.35
[root@rubyplus nginx-0.5.35]# ./configure --sbin-path=/sbin/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module
--with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1
checking for OS
+ Linux 2.6.18-53.1.6.el5.028stab053.6PAE i686
checking for C compiler ... not found
./configure: error: C compiler gcc is not found
[root@rubyplus nginx-0.5.35]# yum install gcc
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for gcc to pack into transaction set.
gcc-4.1.2-14.el5.i386.rpm 100% |=========================| 64 kB 00:00
---> Package gcc.i386 0:4.1.2-14.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libgomp.so.1 for package: gcc
--> Processing Dependency: binutils >= 2.17.50.0.2-8 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
glibc-common-2.5-18.el5_1 100% |=========================| 723 kB 00:00
---> Package glibc-common.i386 0:2.5-18.el5_1.1 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
gcc i386 4.1.2-14.el5 base 5.2 M
Installing for dependencies:
binutils i386 2.17.50.0.6-5.el5 base 2.9 M
cpp i386 4.1.2-14.el5 base 2.6 M
glibc-devel i386 2.5-18.el5_1.1 updates 2.0 M
glibc-headers i386 2.5-18.el5_1.1 updates 609 k
libgomp i386 4.1.2-14.el5 base 76 k
Updating for dependencies:
glibc i686 2.5-18.el5_1.1 updates 5.1 M
glibc-common i386 2.5-18.el5_1.1 updates 16 M
libgcc i386 4.1.2-14.el5 base 87 k
Transaction Summary
=============================================================================
Install 6 Package(s)
Update 3 Package(s)
Remove 0 Package(s)
Total download size: 35 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): binutils-2.17.50.0 100% |=========================| 2.9 MB 00:03
(2/9): gcc-4.1.2-14.el5.i 100% |=========================| 5.2 MB 00:07
(3/9): libgcc-4.1.2-14.el 100% |=========================| 87 kB 00:00
(4/9): libgomp-4.1.2-14.e 100% |=========================| 76 kB 00:00
(5/9): glibc-2.5-18.el5_1 100% |=========================| 5.1 MB 00:02
(6/9): cpp-4.1.2-14.el5.i 100% |=========================| 2.6 MB 00:02
(7/9): glibc-headers-2.5- 100% |=========================| 609 kB 00:00
(8/9): glibc-common-2.5-1 100% |=========================| 16 MB 00:07
(9/9): glibc-devel-2.5-18 100% |=========================| 2.0 MB 00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libgcc ####################### [ 1/12]
Updating : glibc-common ####################### [ 2/12]
Updating : glibc ####################### [ 3/12]
Installing: binutils ####################### [ 4/12]
Installing: libgomp ####################### [ 5/12]
Installing: cpp ####################### [ 6/12]
Installing: glibc-headers ####################### [ 7/12]
Installing: glibc-devel ####################### [ 8/12]
Installing: gcc ####################### [ 9/12]
Cleanup : libgcc ####################### [10/12]
Cleanup : glibc ####################### [11/12]
Cleanup : glibc-common ####################### [12/12]
Installed: gcc.i386 0:4.1.2-14.el5
Dependency Installed: binutils.i386 0:2.17.50.0.6-5.el5 cpp.i386 0:4.1.2-14.el5 glibc-devel.i386 0:2.5-18.el5_1.1 glibc-headers.i386 0:2.5-18.el5_1.1 libgomp.i386 0:4.1.2-14.el5
Dependency Updated: glibc.i686 0:2.5-18.el5_1.1 glibc-common.i386 0:2.5-18.el5_1.1 libgcc.i386 0:4.1.2-14.el5
Complete!
[root@rubyplus nginx-0.5.35]# ./configure --sbin-path=/sbin/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module
--with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1
checking for OS
+ Linux 2.6.18-53.1.6.el5.028stab053.6PAE i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.1.2 20070626 (Red Hat 4.1.2-14)
checking for gcc -pipe switch ... found
checking for gcc variadic macros ... found
checking for C99 variadic macros ... found
checking for unistd.h ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
Configuration summary
+ threads are not used
+ using system PCRE library
+ using system OpenSSL library
+ using md5 library: auto/lib/md5
+ using sha1 library: auto/lib/sha1
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/sbin/nginx"
nginx configuration file: "/usr/local/nginx/nginx.conf"
nginx pid file: "/usr/local/nginx/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "/usr/local/nginx/client_body_temp"
nginx http proxy temporary files: "/usr/local/nginx/proxy_temp"
nginx http fastcgi temporary files: "/usr/local/nginx/fastcgi_temp"
Run:
make
make install
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for pcre to pack into transaction set.
pcre-6.6-2.el5_1.7.i386.r 100% |=========================| 7.4 kB 00:00
---> Package pcre.i386 0:6.6-2.el5_1.7 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
pcre i386 6.6-2.el5_1.7 updates 112 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 112 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): pcre-6.6-2.el5_1.7.i386.rpm 112 kB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : pcre ######################### [1/2]
Cleanup : pcre ######################### [2/2]
Updated: pcre.i386 0:6.6-2.el5_1.7
Complete!
[root@rubyplus etc]# yum install pcre-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for pcre-devel to pack into transaction set.
pcre-devel-6.6-2.el5_1.7. 100% |=========================| 10 kB 00:00
---> Package pcre-devel.i386 0:6.6-2.el5_1.7 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
pcre-devel i386 6.6-2.el5_1.7 updates 176 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 176 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): pcre-devel-6.6-2.el5_1.7.i386.rpm 176 kB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: pcre-devel ######################### [1/1]
Installed: pcre-devel.i386 0:6.6-2.el5_1.7
Complete!
[root@rubyplus etc]# yum install zlib
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install zlib-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install openssl
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install openssl-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with
-http_sub_module --with-http_dav_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-cc-opt="-I /usr/include/pcre" --pid-path=/var/run/ngin
x.pid --lock-path=/var/lock/subsys/nginx --conf-path=/etc/nginx/nginx.conf
-bash: ./configure: No such file or directory
[root@rubyplus etc]#
[root@rubyplus etc]# wget http://sysoev.ru/nginx/nginx-0.5.35.tar.gz
--12:44:58-- http://sysoev.ru/nginx/nginx-0.5.35.tar.gz
Resolving sysoev.ru... 81.19.69.70
Connecting to sysoev.ru|81.19.69.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 488926 (477K) [application/octet-stream]
Saving to: `nginx-0.5.35.tar.gz'
100%[===============================================================================================================================>] 488,926 48.7K/s in 9.3s
12:45:08 (51.3 KB/s) - `nginx-0.5.35.tar.gz' saved [488926/488926]
[root@rubyplus etc]# tar xzvf nginx-0.5.35.tar.gz
nginx-0.5.35/
nginx-0.5.35/contrib/unicode2nginx/koi-utf
[root@rubyplus etc]# cd nginx-0.5.35
[root@rubyplus nginx-0.5.35]# ./configure --sbin-path=/sbin/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module
--with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1
checking for OS
+ Linux 2.6.18-53.1.6.el5.028stab053.6PAE i686
checking for C compiler ... not found
./configure: error: C compiler gcc is not found
[root@rubyplus nginx-0.5.35]# yum install gcc
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for gcc to pack into transaction set.
gcc-4.1.2-14.el5.i386.rpm 100% |=========================| 64 kB 00:00
---> Package gcc.i386 0:4.1.2-14.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libgomp.so.1 for package: gcc
--> Processing Dependency: binutils >= 2.17.50.0.2-8 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
glibc-common-2.5-18.el5_1 100% |=========================| 723 kB 00:00
---> Package glibc-common.i386 0:2.5-18.el5_1.1 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
gcc i386 4.1.2-14.el5 base 5.2 M
Installing for dependencies:
binutils i386 2.17.50.0.6-5.el5 base 2.9 M
cpp i386 4.1.2-14.el5 base 2.6 M
glibc-devel i386 2.5-18.el5_1.1 updates 2.0 M
glibc-headers i386 2.5-18.el5_1.1 updates 609 k
libgomp i386 4.1.2-14.el5 base 76 k
Updating for dependencies:
glibc i686 2.5-18.el5_1.1 updates 5.1 M
glibc-common i386 2.5-18.el5_1.1 updates 16 M
libgcc i386 4.1.2-14.el5 base 87 k
Transaction Summary
=============================================================================
Install 6 Package(s)
Update 3 Package(s)
Remove 0 Package(s)
Total download size: 35 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): binutils-2.17.50.0 100% |=========================| 2.9 MB 00:03
(2/9): gcc-4.1.2-14.el5.i 100% |=========================| 5.2 MB 00:07
(3/9): libgcc-4.1.2-14.el 100% |=========================| 87 kB 00:00
(4/9): libgomp-4.1.2-14.e 100% |=========================| 76 kB 00:00
(5/9): glibc-2.5-18.el5_1 100% |=========================| 5.1 MB 00:02
(6/9): cpp-4.1.2-14.el5.i 100% |=========================| 2.6 MB 00:02
(7/9): glibc-headers-2.5- 100% |=========================| 609 kB 00:00
(8/9): glibc-common-2.5-1 100% |=========================| 16 MB 00:07
(9/9): glibc-devel-2.5-18 100% |=========================| 2.0 MB 00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libgcc ####################### [ 1/12]
Updating : glibc-common ####################### [ 2/12]
Updating : glibc ####################### [ 3/12]
Installing: binutils ####################### [ 4/12]
Installing: libgomp ####################### [ 5/12]
Installing: cpp ####################### [ 6/12]
Installing: glibc-headers ####################### [ 7/12]
Installing: glibc-devel ####################### [ 8/12]
Installing: gcc ####################### [ 9/12]
Cleanup : libgcc ####################### [10/12]
Cleanup : glibc ####################### [11/12]
Cleanup : glibc-common ####################### [12/12]
Installed: gcc.i386 0:4.1.2-14.el5
Dependency Installed: binutils.i386 0:2.17.50.0.6-5.el5 cpp.i386 0:4.1.2-14.el5 glibc-devel.i386 0:2.5-18.el5_1.1 glibc-headers.i386 0:2.5-18.el5_1.1 libgomp.i386 0:4.1.2-14.el5
Dependency Updated: glibc.i686 0:2.5-18.el5_1.1 glibc-common.i386 0:2.5-18.el5_1.1 libgcc.i386 0:4.1.2-14.el5
Complete!
[root@rubyplus nginx-0.5.35]# ./configure --sbin-path=/sbin/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module
--with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1
checking for OS
+ Linux 2.6.18-53.1.6.el5.028stab053.6PAE i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.1.2 20070626 (Red Hat 4.1.2-14)
checking for gcc -pipe switch ... found
checking for gcc variadic macros ... found
checking for C99 variadic macros ... found
checking for unistd.h ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
Configuration summary
+ threads are not used
+ using system PCRE library
+ using system OpenSSL library
+ using md5 library: auto/lib/md5
+ using sha1 library: auto/lib/sha1
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/sbin/nginx"
nginx configuration file: "/usr/local/nginx/nginx.conf"
nginx pid file: "/usr/local/nginx/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "/usr/local/nginx/client_body_temp"
nginx http proxy temporary files: "/usr/local/nginx/proxy_temp"
nginx http fastcgi temporary files: "/usr/local/nginx/fastcgi_temp"
Run:
make
make install
Installing MySQL server on Centos 5
Followed the instructions on this blog post : Rails Stack on CentOS 5
The following instructions has the chkconfig which works. The given instruction on the blog for that does not work.
[root@rubyplus etc]# yum install which
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for which to pack into transaction set.
which-2.16-7.i386.rpm 100% |=========================| 6.5 kB 00:00
---> Package which.i386 0:2.16-7 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
which i386 2.16-7 base 23 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 23 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): which-2.16-7.i386. 100% |=========================| 23 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: which ######################### [1/1]
Installed: which.i386 0:2.16-7
Complete!
[root@rubyplus etc]# which mysql
which: no mysql in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@rubyplus etc]# yum install mysql-server
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mysql-server to pack into transaction set.
mysql-server-5.0.22-2.2.e 100% |=========================| 33 kB 00:00
---> Package mysql-server.i386 0:5.0.22-2.2.el5_1.1 set to be updated
--> Running transaction check
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-server
--> Processing Dependency: perl-DBI for package: mysql-server
--> Processing Dependency: mysql = 5.0.22-2.2.el5_1.1 for package: mysql-server
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: perl(DBI) for package: mysql-server
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for perl-DBD-MySQL to pack into transaction set.
perl-DBD-MySQL-3.0007-1.f 100% |=========================| 8.3 kB 00:00
---> Package perl-DBD-MySQL.i386 0:3.0007-1.fc6 set to be updated
---> Downloading header for mysql to pack into transaction set.
mysql-5.0.22-2.2.el5_1.1. 100% |=========================| 36 kB 00:00
---> Package mysql.i386 0:5.0.22-2.2.el5_1.1 set to be updated
---> Downloading header for perl-DBI to pack into transaction set.
perl-DBI-1.52-1.fc6.i386. 100% |=========================| 16 kB 00:00
---> Package perl-DBI.i386 0:1.52-1.fc6 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mysql-server i386 5.0.22-2.2.el5_1.1 updates 10 M
Installing for dependencies:
mysql i386 5.0.22-2.2.el5_1.1 updates 3.0 M
perl-DBD-MySQL i386 3.0007-1.fc6 base 147 k
perl-DBI i386 1.52-1.fc6 base 605 k
Transaction Summary
=============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): perl-DBD-MySQL-3.0 100% |=========================| 147 kB 00:00
(2/4): mysql-5.0.22-2.2.e 100% |=========================| 3.0 MB 00:01
(3/4): mysql-server-5.0.2 100% |=========================| 10 MB 00:04
(4/4): perl-DBI-1.52-1.fc 100% |=========================| 605 kB 00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-DBI ######################### [1/4]
Installing: mysql ######################### [2/4]
Installing: perl-DBD-MySQL ######################### [3/4]
Installing: mysql-server ######################### [4/4]
Installed: mysql-server.i386 0:5.0.22-2.2.el5_1.1
Dependency Installed: mysql.i386 0:5.0.22-2.2.el5_1.1 perl-DBD-MySQL.i386 0:3.0007-1.fc6 perl-DBI.i386 0:1.52-1.fc6
Complete!
[root@rubyplus etc]# yum install mysql
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install mysql-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mysql-devel to pack into transaction set.
mysql-devel-5.0.22-2.2.el 100% |=========================| 28 kB 00:00
---> Package mysql-devel.i386 0:5.0.22-2.2.el5_1.1 set to be updated
--> Running transaction check
--> Processing Dependency: openssl-devel for package: mysql-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for openssl-devel to pack into transaction set.
openssl-devel-0.9.8b-8.3. 100% |=========================| 142 kB 00:00
---> Package openssl-devel.i386 0:0.9.8b-8.3.el5_0.2 set to be updated
--> Running transaction check
--> Processing Dependency: openssl = 0.9.8b-8.3.el5_0.2 for package: openssl-devel
--> Processing Dependency: zlib-devel for package: openssl-devel
--> Processing Dependency: krb5-devel for package: openssl-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for openssl to pack into transaction set.
openssl-0.9.8b-8.3.el5_0. 100% |=========================| 35 kB 00:00
---> Package openssl.i686 0:0.9.8b-8.3.el5_0.2 set to be updated
---> Downloading header for zlib-devel to pack into transaction set.
zlib-devel-1.2.3-3.i386.r 100% |=========================| 7.0 kB 00:00
---> Package zlib-devel.i386 0:1.2.3-3 set to be updated
---> Downloading header for krb5-devel to pack into transaction set.
krb5-devel-1.6.1-17.el5_1 100% |=========================| 48 kB 00:00
---> Package krb5-devel.i386 0:1.6.1-17.el5_1.1 set to be updated
--> Running transaction check
--> Processing Dependency: krb5-libs = 1.6.1-17.el5_1.1 for package: krb5-devel
--> Processing Dependency: e2fsprogs-devel for package: krb5-devel
--> Processing Dependency: libkeyutils.so.1 for package: krb5-devel
--> Processing Dependency: libselinux-devel for package: krb5-devel
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for keyutils-libs to pack into transaction set.
keyutils-libs-1.2-1.el5.i 100% |=========================| 5.0 kB 00:00
---> Package keyutils-libs.i386 0:1.2-1.el5 set to be updated
---> Downloading header for libselinux-devel to pack into transaction set.
libselinux-devel-1.33.4-4 100% |=========================| 45 kB 00:00
---> Package libselinux-devel.i386 0:1.33.4-4.el5 set to be updated
---> Downloading header for krb5-libs to pack into transaction set.
krb5-libs-1.6.1-17.el5_1. 100% |=========================| 45 kB 00:00
---> Package krb5-libs.i386 0:1.6.1-17.el5_1.1 set to be updated
---> Downloading header for e2fsprogs-devel to pack into transaction set.
e2fsprogs-devel-1.39-10.e 100% |=========================| 24 kB 00:00
---> Package e2fsprogs-devel.i386 0:1.39-10.el5_1.1 set to be updated
---> Downloading header for keyutils-libs-devel to pack into transaction set.
keyutils-libs-devel-1.2-1 100% |=========================| 6.7 kB 00:00
---> Package keyutils-libs-devel.i386 0:1.2-1.el5 set to be updated
--> Running transaction check
--> Processing Dependency: e2fsprogs-libs = 1.39-10.el5_1.1 for package: e2fsprogs-devel
--> Processing Dependency: libselinux = 1.33.4-4.el5 for package: libselinux-devel
--> Processing Dependency: libsepol-devel >= 1.15.2-1 for package: libselinux-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libselinux to pack into transaction set.
libselinux-1.33.4-4.el5.i 100% |=========================| 38 kB 00:00
---> Package libselinux.i386 0:1.33.4-4.el5 set to be updated
---> Downloading header for e2fsprogs-libs to pack into transaction set.
e2fsprogs-libs-1.39-10.el 100% |=========================| 19 kB 00:00
---> Package e2fsprogs-libs.i386 0:1.39-10.el5_1.1 set to be updated
---> Downloading header for libsepol-devel to pack into transaction set.
libsepol-devel-1.15.2-1.e 100% |=========================| 29 kB 00:00
---> Package libsepol-devel.i386 0:1.15.2-1.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libselinux = 1.33.4-2.el5 for package: libselinux-python
--> Processing Dependency: e2fsprogs-libs = 1.39-8.el5 for package: e2fsprogs
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libselinux-python to pack into transaction set.
libselinux-python-1.33.4- 100% |=========================| 35 kB 00:00
---> Package libselinux-python.i386 0:1.33.4-4.el5 set to be updated
---> Downloading header for e2fsprogs to pack into transaction set.
e2fsprogs-1.39-10.el5_1.1 100% |=========================| 25 kB 00:00
---> Package e2fsprogs.i386 0:1.39-10.el5_1.1 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mysql-devel i386 5.0.22-2.2.el5_1.1 updates 2.4 M
Installing for dependencies:
e2fsprogs-devel i386 1.39-10.el5_1.1 updates 563 k
keyutils-libs i386 1.2-1.el5 base 18 k
keyutils-libs-devel i386 1.2-1.el5 base 27 k
krb5-devel i386 1.6.1-17.el5_1.1 updates 1.9 M
libselinux-devel i386 1.33.4-4.el5 base 131 k
libsepol-devel i386 1.15.2-1.el5 base 189 k
openssl-devel i386 0.9.8b-8.3.el5_0.2 base 1.8 M
zlib-devel i386 1.2.3-3 base 101 k
Updating for dependencies:
e2fsprogs i386 1.39-10.el5_1.1 updates 960 k
e2fsprogs-libs i386 1.39-10.el5_1.1 updates 114 k
krb5-libs i386 1.6.1-17.el5_1.1 updates 652 k
libselinux i386 1.33.4-4.el5 base 94 k
libselinux-python i386 1.33.4-4.el5 base 55 k
openssl i686 0.9.8b-8.3.el5_0.2 base 1.4 M
Transaction Summary
=============================================================================
Install 9 Package(s)
Update 6 Package(s)
Remove 0 Package(s)
Total download size: 10 M
Is this ok [y/N]: y
Downloading Packages:
(1/15): openssl-0.9.8b-8. 100% |=========================| 1.4 MB 00:01
(2/15): libselinux-1.33.4 100% |=========================| 94 kB 00:00
(3/15): mysql-devel-5.0.2 100% |=========================| 2.4 MB 00:01
(4/15): keyutils-libs-1.2 100% |=========================| 18 kB 00:00
(5/15): e2fsprogs-libs-1. 100% |=========================| 114 kB 00:00
(6/15): libselinux-devel- 100% |=========================| 131 kB 00:00
(7/15): zlib-devel-1.2.3- 100% |=========================| 101 kB 00:00
(8/15): libselinux-python 100% |=========================| 55 kB 00:00
(9/15): openssl-devel-0.9 100% |=========================| 1.8 MB 00:02
(10/15): e2fsprogs-1.39-1 100% |=========================| 960 kB 00:00
(11/15): krb5-libs-1.6.1- 100% |=========================| 652 kB 00:00
(12/15): e2fsprogs-devel- 100% |=========================| 563 kB 00:00
(13/15): keyutils-libs-de 100% |=========================| 27 kB 00:00
(14/15): libsepol-devel-1 100% |=========================| 189 kB 00:00
(15/15): krb5-devel-1.6.1 100% |=========================| 1.9 MB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : e2fsprogs-libs ####################### [ 1/21]
Updating : libselinux ####################### [ 2/21]
Installing: keyutils-libs ####################### [ 3/21]
Updating : krb5-libs ####################### [ 4/21]
Updating : openssl ####################### [ 5/21]
Installing: keyutils-libs-devel ####################### [ 6/21]
Installing: e2fsprogs-devel ####################### [ 7/21]
Installing: libsepol-devel ####################### [ 8/21]
Installing: libselinux-devel ####################### [ 9/21]
Installing: krb5-devel ####################### [10/21]
Installing: zlib-devel ####################### [11/21]
Installing: openssl-devel ####################### [12/21]
Installing: mysql-devel ####################### [13/21]
Updating : libselinux-python ####################### [14/21]
Updating : e2fsprogs ####################### [15/21]
Cleanup : openssl ####################### [16/21]
Cleanup : libselinux ####################### [17/21]
Cleanup : e2fsprogs-libs ####################### [18/21]
Cleanup : libselinux-python ####################### [19/21]
Cleanup : e2fsprogs ####################### [20/21]
Cleanup : krb5-libs ####################### [21/21]
Installed: mysql-devel.i386 0:5.0.22-2.2.el5_1.1
Dependency Installed: e2fsprogs-devel.i386 0:1.39-10.el5_1.1 keyutils-libs.i386 0:1.2-1.el5 keyutils-libs-devel.i386 0:1.2-1.el5 krb5-devel.i386 0:1.6.1-17.el5_1.1 libselinux-devel.i386 0:1.33.4-4.el5 libsepol-devel.i386 0:1.15.2-1.el5 openssl-devel.i386 0:0.9.8b-8.3.el5_0.2 zlib-devel.i386 0:1.2.3-3
Dependency Updated: e2fsprogs.i386 0:1.39-10.el5_1.1 e2fsprogs-libs.i386 0:1.39-10.el5_1.1 krb5-libs.i386 0:1.6.1-17.el5_1.1 libselinux.i386 0:1.33.4-4.el5 libselinux-python.i386 0:1.33.4-4.el5 openssl.i686 0:0.9.8b-8.3.el5_0.2
Complete!
[root@rubyplus etc]# sudo checkconfig --level 345 mysqld on
sudo: checkconfig: command not found
[root@rubyplus etc]# yum install checkconfig
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# sudo checkconfig --level 345 mysqld on
sudo: checkconfig: command not found
[root@rubyplus etc]# chkconfig --level 345 mysqld on
The following instructions has the chkconfig which works. The given instruction on the blog for that does not work.
[root@rubyplus etc]# yum install which
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for which to pack into transaction set.
which-2.16-7.i386.rpm 100% |=========================| 6.5 kB 00:00
---> Package which.i386 0:2.16-7 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
which i386 2.16-7 base 23 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 23 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): which-2.16-7.i386. 100% |=========================| 23 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: which ######################### [1/1]
Installed: which.i386 0:2.16-7
Complete!
[root@rubyplus etc]# which mysql
which: no mysql in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@rubyplus etc]# yum install mysql-server
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mysql-server to pack into transaction set.
mysql-server-5.0.22-2.2.e 100% |=========================| 33 kB 00:00
---> Package mysql-server.i386 0:5.0.22-2.2.el5_1.1 set to be updated
--> Running transaction check
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-server
--> Processing Dependency: perl-DBI for package: mysql-server
--> Processing Dependency: mysql = 5.0.22-2.2.el5_1.1 for package: mysql-server
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: perl(DBI) for package: mysql-server
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for perl-DBD-MySQL to pack into transaction set.
perl-DBD-MySQL-3.0007-1.f 100% |=========================| 8.3 kB 00:00
---> Package perl-DBD-MySQL.i386 0:3.0007-1.fc6 set to be updated
---> Downloading header for mysql to pack into transaction set.
mysql-5.0.22-2.2.el5_1.1. 100% |=========================| 36 kB 00:00
---> Package mysql.i386 0:5.0.22-2.2.el5_1.1 set to be updated
---> Downloading header for perl-DBI to pack into transaction set.
perl-DBI-1.52-1.fc6.i386. 100% |=========================| 16 kB 00:00
---> Package perl-DBI.i386 0:1.52-1.fc6 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mysql-server i386 5.0.22-2.2.el5_1.1 updates 10 M
Installing for dependencies:
mysql i386 5.0.22-2.2.el5_1.1 updates 3.0 M
perl-DBD-MySQL i386 3.0007-1.fc6 base 147 k
perl-DBI i386 1.52-1.fc6 base 605 k
Transaction Summary
=============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): perl-DBD-MySQL-3.0 100% |=========================| 147 kB 00:00
(2/4): mysql-5.0.22-2.2.e 100% |=========================| 3.0 MB 00:01
(3/4): mysql-server-5.0.2 100% |=========================| 10 MB 00:04
(4/4): perl-DBI-1.52-1.fc 100% |=========================| 605 kB 00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-DBI ######################### [1/4]
Installing: mysql ######################### [2/4]
Installing: perl-DBD-MySQL ######################### [3/4]
Installing: mysql-server ######################### [4/4]
Installed: mysql-server.i386 0:5.0.22-2.2.el5_1.1
Dependency Installed: mysql.i386 0:5.0.22-2.2.el5_1.1 perl-DBD-MySQL.i386 0:3.0007-1.fc6 perl-DBI.i386 0:1.52-1.fc6
Complete!
[root@rubyplus etc]# yum install mysql
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# yum install mysql-devel
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mysql-devel to pack into transaction set.
mysql-devel-5.0.22-2.2.el 100% |=========================| 28 kB 00:00
---> Package mysql-devel.i386 0:5.0.22-2.2.el5_1.1 set to be updated
--> Running transaction check
--> Processing Dependency: openssl-devel for package: mysql-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for openssl-devel to pack into transaction set.
openssl-devel-0.9.8b-8.3. 100% |=========================| 142 kB 00:00
---> Package openssl-devel.i386 0:0.9.8b-8.3.el5_0.2 set to be updated
--> Running transaction check
--> Processing Dependency: openssl = 0.9.8b-8.3.el5_0.2 for package: openssl-devel
--> Processing Dependency: zlib-devel for package: openssl-devel
--> Processing Dependency: krb5-devel for package: openssl-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for openssl to pack into transaction set.
openssl-0.9.8b-8.3.el5_0. 100% |=========================| 35 kB 00:00
---> Package openssl.i686 0:0.9.8b-8.3.el5_0.2 set to be updated
---> Downloading header for zlib-devel to pack into transaction set.
zlib-devel-1.2.3-3.i386.r 100% |=========================| 7.0 kB 00:00
---> Package zlib-devel.i386 0:1.2.3-3 set to be updated
---> Downloading header for krb5-devel to pack into transaction set.
krb5-devel-1.6.1-17.el5_1 100% |=========================| 48 kB 00:00
---> Package krb5-devel.i386 0:1.6.1-17.el5_1.1 set to be updated
--> Running transaction check
--> Processing Dependency: krb5-libs = 1.6.1-17.el5_1.1 for package: krb5-devel
--> Processing Dependency: e2fsprogs-devel for package: krb5-devel
--> Processing Dependency: libkeyutils.so.1 for package: krb5-devel
--> Processing Dependency: libselinux-devel for package: krb5-devel
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for keyutils-libs to pack into transaction set.
keyutils-libs-1.2-1.el5.i 100% |=========================| 5.0 kB 00:00
---> Package keyutils-libs.i386 0:1.2-1.el5 set to be updated
---> Downloading header for libselinux-devel to pack into transaction set.
libselinux-devel-1.33.4-4 100% |=========================| 45 kB 00:00
---> Package libselinux-devel.i386 0:1.33.4-4.el5 set to be updated
---> Downloading header for krb5-libs to pack into transaction set.
krb5-libs-1.6.1-17.el5_1. 100% |=========================| 45 kB 00:00
---> Package krb5-libs.i386 0:1.6.1-17.el5_1.1 set to be updated
---> Downloading header for e2fsprogs-devel to pack into transaction set.
e2fsprogs-devel-1.39-10.e 100% |=========================| 24 kB 00:00
---> Package e2fsprogs-devel.i386 0:1.39-10.el5_1.1 set to be updated
---> Downloading header for keyutils-libs-devel to pack into transaction set.
keyutils-libs-devel-1.2-1 100% |=========================| 6.7 kB 00:00
---> Package keyutils-libs-devel.i386 0:1.2-1.el5 set to be updated
--> Running transaction check
--> Processing Dependency: e2fsprogs-libs = 1.39-10.el5_1.1 for package: e2fsprogs-devel
--> Processing Dependency: libselinux = 1.33.4-4.el5 for package: libselinux-devel
--> Processing Dependency: libsepol-devel >= 1.15.2-1 for package: libselinux-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libselinux to pack into transaction set.
libselinux-1.33.4-4.el5.i 100% |=========================| 38 kB 00:00
---> Package libselinux.i386 0:1.33.4-4.el5 set to be updated
---> Downloading header for e2fsprogs-libs to pack into transaction set.
e2fsprogs-libs-1.39-10.el 100% |=========================| 19 kB 00:00
---> Package e2fsprogs-libs.i386 0:1.39-10.el5_1.1 set to be updated
---> Downloading header for libsepol-devel to pack into transaction set.
libsepol-devel-1.15.2-1.e 100% |=========================| 29 kB 00:00
---> Package libsepol-devel.i386 0:1.15.2-1.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libselinux = 1.33.4-2.el5 for package: libselinux-python
--> Processing Dependency: e2fsprogs-libs = 1.39-8.el5 for package: e2fsprogs
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libselinux-python to pack into transaction set.
libselinux-python-1.33.4- 100% |=========================| 35 kB 00:00
---> Package libselinux-python.i386 0:1.33.4-4.el5 set to be updated
---> Downloading header for e2fsprogs to pack into transaction set.
e2fsprogs-1.39-10.el5_1.1 100% |=========================| 25 kB 00:00
---> Package e2fsprogs.i386 0:1.39-10.el5_1.1 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mysql-devel i386 5.0.22-2.2.el5_1.1 updates 2.4 M
Installing for dependencies:
e2fsprogs-devel i386 1.39-10.el5_1.1 updates 563 k
keyutils-libs i386 1.2-1.el5 base 18 k
keyutils-libs-devel i386 1.2-1.el5 base 27 k
krb5-devel i386 1.6.1-17.el5_1.1 updates 1.9 M
libselinux-devel i386 1.33.4-4.el5 base 131 k
libsepol-devel i386 1.15.2-1.el5 base 189 k
openssl-devel i386 0.9.8b-8.3.el5_0.2 base 1.8 M
zlib-devel i386 1.2.3-3 base 101 k
Updating for dependencies:
e2fsprogs i386 1.39-10.el5_1.1 updates 960 k
e2fsprogs-libs i386 1.39-10.el5_1.1 updates 114 k
krb5-libs i386 1.6.1-17.el5_1.1 updates 652 k
libselinux i386 1.33.4-4.el5 base 94 k
libselinux-python i386 1.33.4-4.el5 base 55 k
openssl i686 0.9.8b-8.3.el5_0.2 base 1.4 M
Transaction Summary
=============================================================================
Install 9 Package(s)
Update 6 Package(s)
Remove 0 Package(s)
Total download size: 10 M
Is this ok [y/N]: y
Downloading Packages:
(1/15): openssl-0.9.8b-8. 100% |=========================| 1.4 MB 00:01
(2/15): libselinux-1.33.4 100% |=========================| 94 kB 00:00
(3/15): mysql-devel-5.0.2 100% |=========================| 2.4 MB 00:01
(4/15): keyutils-libs-1.2 100% |=========================| 18 kB 00:00
(5/15): e2fsprogs-libs-1. 100% |=========================| 114 kB 00:00
(6/15): libselinux-devel- 100% |=========================| 131 kB 00:00
(7/15): zlib-devel-1.2.3- 100% |=========================| 101 kB 00:00
(8/15): libselinux-python 100% |=========================| 55 kB 00:00
(9/15): openssl-devel-0.9 100% |=========================| 1.8 MB 00:02
(10/15): e2fsprogs-1.39-1 100% |=========================| 960 kB 00:00
(11/15): krb5-libs-1.6.1- 100% |=========================| 652 kB 00:00
(12/15): e2fsprogs-devel- 100% |=========================| 563 kB 00:00
(13/15): keyutils-libs-de 100% |=========================| 27 kB 00:00
(14/15): libsepol-devel-1 100% |=========================| 189 kB 00:00
(15/15): krb5-devel-1.6.1 100% |=========================| 1.9 MB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : e2fsprogs-libs ####################### [ 1/21]
Updating : libselinux ####################### [ 2/21]
Installing: keyutils-libs ####################### [ 3/21]
Updating : krb5-libs ####################### [ 4/21]
Updating : openssl ####################### [ 5/21]
Installing: keyutils-libs-devel ####################### [ 6/21]
Installing: e2fsprogs-devel ####################### [ 7/21]
Installing: libsepol-devel ####################### [ 8/21]
Installing: libselinux-devel ####################### [ 9/21]
Installing: krb5-devel ####################### [10/21]
Installing: zlib-devel ####################### [11/21]
Installing: openssl-devel ####################### [12/21]
Installing: mysql-devel ####################### [13/21]
Updating : libselinux-python ####################### [14/21]
Updating : e2fsprogs ####################### [15/21]
Cleanup : openssl ####################### [16/21]
Cleanup : libselinux ####################### [17/21]
Cleanup : e2fsprogs-libs ####################### [18/21]
Cleanup : libselinux-python ####################### [19/21]
Cleanup : e2fsprogs ####################### [20/21]
Cleanup : krb5-libs ####################### [21/21]
Installed: mysql-devel.i386 0:5.0.22-2.2.el5_1.1
Dependency Installed: e2fsprogs-devel.i386 0:1.39-10.el5_1.1 keyutils-libs.i386 0:1.2-1.el5 keyutils-libs-devel.i386 0:1.2-1.el5 krb5-devel.i386 0:1.6.1-17.el5_1.1 libselinux-devel.i386 0:1.33.4-4.el5 libsepol-devel.i386 0:1.15.2-1.el5 openssl-devel.i386 0:0.9.8b-8.3.el5_0.2 zlib-devel.i386 0:1.2.3-3
Dependency Updated: e2fsprogs.i386 0:1.39-10.el5_1.1 e2fsprogs-libs.i386 0:1.39-10.el5_1.1 krb5-libs.i386 0:1.6.1-17.el5_1.1 libselinux.i386 0:1.33.4-4.el5 libselinux-python.i386 0:1.33.4-4.el5 openssl.i686 0:0.9.8b-8.3.el5_0.2
Complete!
[root@rubyplus etc]# sudo checkconfig --level 345 mysqld on
sudo: checkconfig: command not found
[root@rubyplus etc]# yum install checkconfig
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@rubyplus etc]# sudo checkconfig --level 345 mysqld on
sudo: checkconfig: command not found
[root@rubyplus etc]# chkconfig --level 345 mysqld on
Could not retrieve mirrorlist on CentOS 5.0
Problem:
# yum install ruby
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Error: Cannot find a valid baseurl for repo: base
Resolution:
Add the nameserver entry to your /etc/resolv.conf file.
-----
nameserver 1.2.3.4
Replace 1.2.3.4 with the actual values for your server
# yum install ruby
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Error: Cannot find a valid baseurl for repo: base
Resolution:
Add the nameserver entry to your /etc/resolv.conf file.
-----
nameserver 1.2.3.4
Replace 1.2.3.4 with the actual values for your server
Wednesday, April 09, 2008
How to find out the version of CentOS?
[root@rubyplus ~]# uname -a
Linux rubyplus.tempdomain.com 2.6.18-53.1.6.el5.028stab053.6PAE #1 SMP Mon Feb 11 20:53:20 MSK 2008 i686 i686 i386 GNU/Linux
Doesnt tell much
[root@rubyplus ~]# rpm -qa | grep centos
filesystem-2.4.0-1.el5.centos
basesystem-8.0-5.1.1.el5.centos
procmail-3.22-17.1.el5.centos
initscripts-8.45.14.EL-1.el5.centos.1
httpd-2.2.3-6.el5.centos.1
setuptool-1.19.2-1.el5.centos
centos-release-notes-5.0.0-2
gzip-1.3.5-9.el5.centos
centos-release-5-0.0.el5.centos.2
httpd-manual-2.2.3-6.el5.centos.1
yum-3.0.5-1.el5.centos.2
Says what's installed.
[root@rubyplus ~]# cat /etc/issue
CentOS release 5 (Final)
Kernel \r on an \m
This is clear.
Linux rubyplus.tempdomain.com 2.6.18-53.1.6.el5.028stab053.6PAE #1 SMP Mon Feb 11 20:53:20 MSK 2008 i686 i686 i386 GNU/Linux
Doesnt tell much
[root@rubyplus ~]# rpm -qa | grep centos
filesystem-2.4.0-1.el5.centos
basesystem-8.0-5.1.1.el5.centos
procmail-3.22-17.1.el5.centos
initscripts-8.45.14.EL-1.el5.centos.1
httpd-2.2.3-6.el5.centos.1
setuptool-1.19.2-1.el5.centos
centos-release-notes-5.0.0-2
gzip-1.3.5-9.el5.centos
centos-release-5-0.0.el5.centos.2
httpd-manual-2.2.3-6.el5.centos.1
yum-3.0.5-1.el5.centos.2
Says what's installed.
[root@rubyplus ~]# cat /etc/issue
CentOS release 5 (Final)
Kernel \r on an \m
This is clear.
Saturday, April 05, 2008
Authorize.net CIM and ARB
CIM cannot be used in combination with the ARB Service. These are two totally separate services.
Customer Information Manager (CIM) is a new paid service that allows merchants to store their
customers’ sensitive payment information on our secure servers for use in future transactions. CIM
helps eliminate steps in the checkout process for a merchant’s repeat customers, potentially
increasing loyalty and revenue. It can also help merchants comply with the Payment Card Industry (PCI)
Data Security Standard, since customer information is no longer stored on their local servers.
Automated Recurring Billing (ARB) is a powerful tool that enables you to provide a scheduled
recurring billing service to your customers. ARB is completely automated—there’s no manual entry of
transactions required at each billing. The process is simple. You will create an ARB
“subscription” (using a subscription form similar to the Virtual Terminal) that includes the customer’s
payment information, billing amount, and a specific billing interval and duration. The payment
gateway does the rest, generating the subsequent recurring transactions based on the set schedule.
Subscriptions may also be created from eligible previous transactions and via batch upload.
For more details refer the development documentation.
Customer Information Manager (CIM) is a new paid service that allows merchants to store their
customers’ sensitive payment information on our secure servers for use in future transactions. CIM
helps eliminate steps in the checkout process for a merchant’s repeat customers, potentially
increasing loyalty and revenue. It can also help merchants comply with the Payment Card Industry (PCI)
Data Security Standard, since customer information is no longer stored on their local servers.
Automated Recurring Billing (ARB) is a powerful tool that enables you to provide a scheduled
recurring billing service to your customers. ARB is completely automated—there’s no manual entry of
transactions required at each billing. The process is simple. You will create an ARB
“subscription” (using a subscription form similar to the Virtual Terminal) that includes the customer’s
payment information, billing amount, and a specific billing interval and duration. The payment
gateway does the rest, generating the subsequent recurring transactions based on the set schedule.
Subscriptions may also be created from eligible previous transactions and via batch upload.
For more details refer the development documentation.
Thursday, April 03, 2008
monit install problem
I was getting error message while ./configure of monit:
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
configure: error: monit requires flex, not lex
Flex was not installed. I installed that via:
apt-get install flex
After doing that, ./configure works fine.
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
configure: error: monit requires flex, not lex
Flex was not installed. I installed that via:
apt-get install flex
After doing that, ./configure works fine.
Subscribe to:
Posts (Atom)