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!
Monday, August 25, 2008
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
Subscribe to:
Posts (Atom)