Rails e ubuntu

Salve,

sono disperata…ho installato ruby on rails in ubuntu da pochissimo
(grazie sopratutto al vostro aiuto).

Ora che ho tutto installato e creato anche applicazione, ecc ho problemi
nel creare i db (rake db:create), penso avere problemi con la gem mysql
che non ho installato (gem list…non compare)…cerco di installarla ma
mi da errore (vedere qui sotto), è tutto il pomeriggio che cerco in
internet ma penso di avere dei casini…cerco “mysql_config” nel mio
sistema con “locate mysql_config” e il percorso è
“/opt/lampp/bin/mysql_config”, premetto che ho anche installato xampp

per favore aiutatemi, grazie


~# sudo gem install mysql – --with-mysql-config=/usr/bin/mysql_config
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb --with-mysql-config=/usr/bin/mysql_config
extconf.rb:10: command not found: /usr/bin/mysql_config --cflags
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/usr/bin/ruby1.8
–with-mysql-config

Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1
for inspection.
Results logged to
/var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

Ciao,
prova con un sudo apt-get install libmysqlclient-dev
dovrebbero essere le librerie che ti servono…

On Wed, Dec 29, 2010 at 8:03 PM, Ste Pp [email protected] wrote:

sistema con “locate mysql_config” e il percorso
/usr/bin/ruby1.8 extconf.rb --with-mysql-config=/usr/bin/mysql_config
–without-opt-include=${opt-dir}/include
Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.8.1


“Without craftsmanship, inspiration is a mere reed shaken in the wind”

Alberto Barril
Clean Coder

ti ringrazio sembra abbia funzionato e installato gem mysql anche
se…!?:

~# gem install mysql
Building native extensions. This could take a while…
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1…

No definition for next_result

No definition for field_name

No definition for field_table

No definition for field_def

No definition for field_type

No definition for field_length

No definition for field_max_length

No definition for field_flags

No definition for field_decimals

No definition for time_inspect

No definition for time_to_s

No definition for time_get_year

No definition for time_get_month

No definition for time_get_day

No definition for time_get_hour

No definition for time_get_minute

No definition for time_get_second

No definition for time_get_neg

No definition for time_get_second_part

No definition for time_set_year

No definition for time_set_month

No definition for time_set_day

No definition for time_set_hour

No definition for time_set_minute

No definition for time_set_second

No definition for time_set_neg

No definition for time_set_second_part

No definition for time_equal

No definition for error_errno

No definition for error_sqlstate
Installing RDoc documentation for mysql-2.8.1…

No definition for next_result

No definition for field_name

No definition for field_table

No definition for field_def

No definition for field_type

No definition for field_length

No definition for field_max_length

No definition for field_flags

No definition for field_decimals

No definition for time_inspect

No definition for time_to_s

No definition for time_get_year

No definition for time_get_month

No definition for time_get_day

No definition for time_get_hour

No definition for time_get_minute

No definition for time_get_second

No definition for time_get_neg

No definition for time_get_second_part

No definition for time_set_year

No definition for time_set_month

No definition for time_set_day

No definition for time_set_hour

No definition for time_set_minute

No definition for time_set_second

No definition for time_set_neg

No definition for time_set_second_part

No definition for time_equal

No definition for error_errno

No definition for error_sqlstate
~#

comunque facendo rake db:migrate compare un’altro errore

~# rake db:migrate
(in /home/utente/NetBeansProjects/myproject)

  *******************************************************************
  * config.breakpoint_server has been deprecated and has no effect. 
  • *******************************************************************
    

rake aborted!
Can’t connect to local MySQL server through socket
‘/var/run/mysqld/mysqld.sock’ (2)

(See full trace by running task with --trace)

…grazie

ottimo!!!

2010/12/29 Ste Pp [email protected]

[email protected]
http://lists.ruby-it.org/mailman/listinfo/ml


“Without craftsmanship, inspiration is a mere reed shaken in the wind”

Alberto Barril
Clean Coder

funziona!!!

ho riavviato il computer e sembra funzionare

grazie infinite