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