Thanks Luis,

I tried to reply to your message yesterday but It seems that it didn't
get sent for some reason. I thanked you on my first reply 'cause your
response came quickly. :)

> Did you uninstalled it before installed it again on top? I'm asking
> this since the first time it executed extconf since it lacks the
> proper makefile.
>
> But the second time could have used the first one created.

Yes I did.

> The problem is that that the sudoer installation of do_mysql will link
> to the headers files and libs that are not part of your xampp
> installation, and will fail.
>
> Try to locate where in xampp installation is mysql_config (or
> mysql_config5) and add it to your $PATH, in that way, do_mysql will
> use it instead of requiring you supply the configure options every
> time.

The mysql_config file is located at /opt/lampp/bin and its already
added to my $PATH. :(

By the way, here's the error message I get when I try to install
do_mysql (no sudo):

gem install do_mysql
Building native extensions.  This could take a while...
ERROR:  Error installing do_mysql:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb install do_mysql
checking for mysql.h... yes
checking for main() in -lmysqlclient... yes
checking for mysql_query()... yes
checking for mysql_ssl_set()... yes
creating Makefile

make
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DHAVE_MYSQL_H -
DHAVE_MYSQL_QUERY -DHAVE_MYSQL_SSL_SET  -D_FILE_OFFSET_BITS=64  -I/opt/
lampp/include/mysql  -I/opt/lampp/include -L/opt/lampp/lib -Wl,--rpath
-Wl,/opt/lampp/lib -fPIC -fno-strict-aliasing -g -g -O2  -fPIC  -
Wall   -c do_mysql_ext.c
In file included from do_mysql_ext.c:6:
/opt/lampp/include/mysql/my_global.h:361:24: error: asm/atomic.h: No
such file or directory
make: *** [do_mysql_ext.o] Error 1


On Nov 24, 2:39 am, "Luis Lavena" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 23, 2008 at 4:30 PM, asartalo <[EMAIL PROTECTED]> wrote:
>
> > Hello everyone,
>
> > I'm new to DataMapper and ruby in general so please bear with me. I am
> > trying to use DM with ramaze on Ubuntu (Intrepid Ibex). As what the
> > ramaze book recommended, I edited my .bashrc file to include the
> > following lines at the end:
>
> > export RUBYOPT=-rubygems
> > export GEM_HOME="$HOME/.gems"
> > export GEM_PATH="$GEM_HOME"
> > export PATH="$HOME/.gems/bin:/opt/lampp/bin:$PATH;"
>
> > This made it easier to install gems. I didn't have to use sudo to
> > install them as in
>
> > gem install datamapper
>
> > instead of
>
> > sudo gem install datamapper
>
> That's a good practice, let you isolate the environment.
>
> > You may have noticed that I also added the path to my xampp
> > installation to the PATH global variable. I use my xampp installation
> > for php work and I thought it would be convenient to use its mysql.
> > Before installing do_mysql, I installed the mysql gem first using the
> > command:
>
> > gem install -y mysql -- --with-mysql-lib=/opt/lampp/lib/mysql --with-
> > mysql-include=/opt/lampp/include/mysql
>
> > ...and it worked. But when I tried to install do_mysql using:
>
> > gem install -y do_mysql
>
> It doesn't work since it rely on mysql_config and some include
> definitions that are out of the standard include and lib locations.
>
> To allow extconf.rb build the Makefile properly it need certain things
> to be available in your environment. If not, you are forced to do the
> --with-* parameters instead
>
>
>
> > After searching on Google for some solutions, none of them seemed to
> > work for me. While I was experimenting though, I tried installing
> > mysql and do_mysql using sudo. So my commands will now look like:
>
> > sudo gem install -y mysql -- --with-mysql-lib=/opt/lampp/lib/mysql --
> > with-mysql-include=/opt/lampp/include/mysql
>
> > sudo gem install -y do_mysql
>
> > ...and they all installed fine!
>
> Did you uninstalled it before installed it again on top? I'm asking
> this since the first time it executed extconf since it lacks the
> proper makefile.
>
> But the second time could have used the first one created.
>
> > Problem is, I don't want to use sudo cause it's installing the gem
> > files not on my user home path ($HOME/.gem) where most of my gems are
> > already installed (and without problems, really).
>
> > Can anyone tell me how to install do_mysql without using do_mysql?
>
> > If it can help you, I did install libmysqlclient15-dev and that's what
> > I think made "sudo gem install do_mysql" work.
>
> The problem is that that the sudoer installation of do_mysql will link
> to the headers files and libs that are not part of your xampp
> installation, and will fail.
>
> Try to locate where in xampp installation is mysql_config (or
> mysql_config5) and add it to your $PATH, in that way, do_mysql will
> use it instead of requiring you supply the configure options every
> time.
>
> HTH,
> --
> Luis Lavena
> AREA 17
> -
> Human beings, who are almost unique in having the ability to learn from
> the experience of others, are also remarkable for their apparent
> disinclination to do so.
> Douglas Adams
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to