[Radiant] setup_database error
jlopez at hpcf.upr.edu
jlopez at hpcf.upr.edu
Thu Oct 19 13:52:20 CDT 2006
Hi,
Now I'm having a similar problem with the mysql gem on a different server.
When I /gem install mysql and choose 2 there is an error.
> 2
Building native extensions. This could take a while...
/usr/local/ruby/lib/ruby/1.8/fileutils.rb:243: command not found: ruby
extconf.rb install mysql
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
/usr/local/ruby/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
ruby extconf.rb install mysql\n
Results logged to
/usr/local/ruby/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
Then, when I try to reconfigure /mysql-2.7/extconf.rb
[flmm][/usr/local/ruby/lib/ruby/gems/1.8/gems/mysql-2.7]$ ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
*** 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.
I know I've to use configuration options but feel totally lost again.
Jose : (
> Thenks Bohdi!
>
> I got Radiant installed succesfully after struggling with the mysql gem. I
> followed http://www.rubyforums.com/showthread.php?t=132
>
>
> Thanks!
>
> ......
>
>> I tried gem install mysql -- --with-mysql-include=/usr/include/mysql
>> --with-mysql-lib=/usr/lib/mysql
>>
>> Whis is supposed to work on Fedora 3.
>>
>> Select which gem to install for your platform (i686-linux)
>> 1. mysql 2.7.1 (mswin32)
>> 2. mysql 2.7 (ruby)
>> 3. mysql 2.6 (ruby)
>> 4. mysql 2.5.1 (ruby)
>> 5. Cancel installation
>>> 1
>> Successfully installed mysql-2.7.1-mswin32
>> Installing ri documentation for mysql-2.7.1-mswin32...
>> Installing RDoc documentation for mysql-2.7.1-mswin32...
>> While generating documentation for mysql-2.7.1-mswin32
>> ... MESSAGE: Unhandled special: Special: type=17, text="<!-- $Id:
>> README.html,v 1.18 2006/06/04 14:39:53 tommy Exp $ -->"
>> ... RDOC args: --op
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/doc/mysql-2.7.1-mswin32/rdoc
>> --exclude ext --main README --quiet ext README
>> docs/README.html(continuing
>> with the rest of the installation)
>>
>> Now, when I -bash-3.00$ ruby script/setup_database
>> Run `setup_database --help` for information on additional options.
>>
>> Loading development environment...OK
>>
>> WARNING! This script will overwrite information currently stored in
>> thedatabase "Cybrary_dev". Are you sure you want to continue? [Yn] Y
>>
>> Creating tables...
>> -- drop_table("config")
>> -- create_table("config", {:force=>true})
>> FAILED
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
>> `log': Mysql::Error: Lostconnection to MySQL server during query: CREATE
>> TABLE config (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY,
>> `key`
>> varchar(40) DEFAULT '' NOT NULL, `value` varchar(255) DEFAULT '')
>> ENGINE=InnoDB (ActiveRecord::StatementInvalid) from
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:184:in
>> `execute' from
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in
>> `create_table'
>> from
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:297:in
>> `create_table' from
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:273:in
>> `send'
>> from
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:273:in
>> `method_missing'
>> from
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:257:in
>> `say_with_time'
>> from /home/cybrary/source/ruby/lib/ruby/1.8/benchmark.rb:293:in
>> `measure'
>> from
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:257:in
>> `say_with_time'
>> ... 6 levels...
>> from script/setup_database:99:in `create_tables'
>> from script/setup_database:19:in `run'
>> from script/setup_database:9:in `run'
>> from script/setup_database:297
>>
>> Error!!
>>
>> If I choose 2,
>>
>>> 2
>> Building native extensions. This could take a while...
>> /home/cybrary/source/ruby/lib/ruby/1.8/fileutils.rb:243: command not
>> found: ruby extconf.rb install mysql --
>> --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql
>>
>> ERROR: While executing gem ... (RuntimeError)
>> ERROR: Failed to build gem native extension.
>> Gem files will remain installed in
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/mysql-2.7 for
>> inspection.
>>
>>
>> Results logged to
>> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
>>
>> Doesn't even install. I've no clue.
>>
>> jose.
>>
>>> Carlos,
>>>
>>> Thanks for the info. I had already read that post elsewhere but It
>>> wasn't
>>> so detailed as the one you sent me. I'll be trying that out today on
>>> Fedora 3. I have a doubt though.
>>>
>>> What do the following lines mean?
>>>
>>> -- --with-mysql-include=/usr/include/mysql
>>> --with-mysql-lib=/usr/lib/mysql
>>>
>>> If they mean I'l be writing to that /usr/ directory It won't work
>>> because
>>> I'm on a shared host and lack root access.
>>>
>>> I feel like a total noob.
>>>
>>>
>>> Jose.
>>>
>>>> Jose,
>>>>
>>>> I had a similar problem a few days ago. I found out that some
>>>> connection problem with the database are due to the Ruby MySQL
>>>> bindings.
>>>>
>>>> Maybe you can get an answer for your problem here:
>>>> http://wiki.rubyonrails.com/rails/pages/Mysql+Connection+Problems
>>>>
>>>> - Carlos
>>>>
>>>> 2006/10/5, jlopez at hpcf.upr.edu <jlopez at hpcf.upr.edu>:
>>>>> Hi,
>>>>>
>>>>> In response to Bodhi.
>>>>>
>>>>> Im running mysql Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu
>>>>> (i686)
>>>>> using readline 4.3.
>>>>>
>>>>> I viewed the file
>>>>> /ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
>>>>> d/connection_adapters/mysql_adapter.rb but I didn't see the version.
>>>>>
>>>>> How can I get its version?
>>>>>
>>>>>
>>>>> I've installed Ruby 1.8.5, Gems 0.9.0, Rails 1.1.6, and Radiant 0.5.2
>>>>>
>>>>>
>>>>> Jose.
>>>>>
>>>>>
>>>>> >
>>>>> > On Oct 5, 2006, at 12:28 PM, jlopez at hpcf.upr.edu wrote:
>>>>> >
>>>>> >> Hi,
>>>>> >>
>>>>> >> I'm having an installation problem with Radiant.
>>>>> >
>>>>> > <snip>
>>>>> >
>>>>> >> Creating tables...
>>>>> >> -- drop_table("config")
>>>>> >> -- create_table("config", {:force=>true})
>>>>> >> FAILED
>>>>> >> /home/cybrary/source/ruby/lib/ruby/gems/1.8/gems/
>>>>> >> activerecord-1.14.4/lib/active_record/connection_adapters/
>>>>> >> abstract_adapter.rb:120:in
>>>>> >> `log': Mysql::Error: Lost connection to MySQL server during query:
>>>>> >> CREATE
>>>>> >> TABLE config (`id` int(11) DEFAULT NULL auto_increment PRIMARY
>>>>> KEY,
>>>>> >> `key`
>>>>> >> varchar(40) DEFAULT '' NOT NULL, `value` varchar(255) DEFAULT '')
>>>>> >> ENGINE=InnoDB (ActiveRecord::StatementInvalid)
>>>>> >
>>>>> > ^^^^^ Last line is your problem, ActiveRecord::StatementInvalid. I
>>>>> > think it means that the database didnt understand the command that
>>>>> > rails sent to it.
>>>>> >
>>>>> > Could you give us some more info about your system? What version of
>>>>> > mysql are you running? And what ruby-mysql adapter? I think I
>>>>> > remember reading that one of the ruby-mysql adapters is broken, but
>>>>> I
>>>>> > only have experience with Postgresql and SQLite.
>>>>> >
>>>>> > Bodhi
>>>>> > _______________________________________________
>>>>> > Radiant mailing list
>>>>> > Post: Radiant at lists.radiantcms.org
>>>>> > Search: http://radiantcms.org/mailing-list/search/
>>>>> > Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>> >
>>>>>
>>>>> _______________________________________________
>>>>> Radiant mailing list
>>>>> Post: Radiant at lists.radiantcms.org
>>>>> Search: http://radiantcms.org/mailing-list/search/
>>>>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>>
>>>>
>>>>
>>>> --
>>>> -------------------------------------------------
>>>> Carlos David González Abraham
>>>> www.gonzalez-abraham.com.mx
>>>> _______________________________________________
>>>> Radiant mailing list
>>>> Post: Radiant at lists.radiantcms.org
>>>> Search: http://radiantcms.org/mailing-list/search/
>>>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>
>>>
>>> _______________________________________________
>>> Radiant mailing list
>>> Post: Radiant at lists.radiantcms.org
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>
>> _______________________________________________
>> Radiant mailing list
>> Post: Radiant at lists.radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>
> _______________________________________________
> Radiant mailing list
> Post: Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
More information about the Radiant
mailing list