Problem in importing database into Postgresql


#1

Hello Every body,.

I try to import schema.rb which I have under db/schema.rb. using the
command.

rake db_schema_import

Its always shows me the error like.

[root@dhcppc2 fun]# rake db_schema_import --trace
(in /home/fundev/fun)
** Invoke db_schema_import (first_time)
** Invoke db:schema:load (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
no such file to load – ferret
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in
require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:innew_constants_in’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in
require' /home/fundev/fun/config/../vendor/plugins/acts_as_ferret/init.rb:1:inload_plugin’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:401:in
load_plugin' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/kernel/reporting.rb:11:insilence_warnings’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:401:in
load_plugin' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:185:inload_plugins’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:185:in
load_plugins' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:105:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:43:in
run' /home/fundev/fun/config/../config/environment.rb:17 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/tasks/misc.rake:3
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:inexecute’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:ininvoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:ininvoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:ininvoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:ininvoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:insynchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:inrun’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/local/bin/rake:18
[root@dhcppc2 fun]#

How can I overcome this . Any else I have to modify in another
files…


#2

no such file to load – ferret

gem install ferret


#3

removed_email_address@domain.invalid wrote:

no such file to load – ferret

gem install ferret

Yes . Thanks for your reply :

And I try to install ferret gem in my local machine .

It goes like this :

[root@dhcppc2 ~]# gem install ferret
Need to update 1 gems from http://gems.rubyforge.org
.
complete
Select which gem to install for your platform (i686-linux)

  1. ferret 0.11.3 (ruby)
  2. ferret 0.11.2 (ruby)
  3. ferret 0.11.1 (ruby)

1

Building native extensions. This could take a while…
ruby extconf.rb install ferret
creating Makefile

make
make install
/usr/bin/install -c -m 0755 ferret_ext.so
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib

make clean
Successfully installed ferret-0.11.3
Installing ri documentation for ferret-0.11.3…
Installing RDoc documentation for ferret-0.11.3…

But when I try to install acts_as_ferret :

[root@dhcppc2 ~]# gem install acts_as_ferret
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed acts_as_ferret-0.4.0
Installing ri documentation for acts_as_ferret-0.4.0…

lib/index.rb:23:41: ‘:’ not followed by identified or operator
Installing RDoc documentation for acts_as_ferret-0.4.0…

lib/index.rb:23:41: ‘:’ not followed by identified or operator
[root@dhcppc2 ~]#

Here I want to know whether both ferret and act_as_ferret installed
corretly or not. Please let me explain whether I have to make any
changes in my environment.rb file to enable this ferret.

Thanks with Regards,
Veeraa


#4

Mischa B. wrote:

Here I want to know whether both ferret and act_as_ferret installed
corretly or not. Please let me explain whether I have to make any
changes in my environment.rb file to enable this ferret.

I think both Ferret and acts_as_ferret were correctly installed.
Sometimes you get errors when the documentation is installed. But you
got “Successfully installed acts_as_ferret-0.4.0”, so it seems to be OK.
My experience is that when you try ‘gem install acts_as_ferret’ again,
the errors go away.

As for changes in environment.rb; you have to add the following line:
require ‘acts_as_ferret’

For more info see: http://projects.jkraemer.net/acts_as_ferret

Cheers,

Mischa.


http://boxroom.rubyforge.org

Thank for your reply

And now can’t start my web server using this command

ruby script/server

=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
Exiting
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:263:in
load_missing_constant': uninitialized constant Ferret::Store (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:452:inconst_missing’
from
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:23
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:inrequire’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:in
new_constants_in' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:inrequire’
from
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret.rb:28
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
require' ... 28 levels... from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:inrequire’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/commands/server.rb:39
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
from script/server:3

or else using
[fundev@dhcppc2 fun]$ script/console
Loading development environment.

require ‘ferret’
=> []

Its goes blank . I can’t start my web server


#5

Here I want to know whether both ferret and act_as_ferret installed
corretly or not. Please let me explain whether I have to make any
changes in my environment.rb file to enable this ferret.

I think both Ferret and acts_as_ferret were correctly installed.
Sometimes you get errors when the documentation is installed. But you
got “Successfully installed acts_as_ferret-0.4.0”, so it seems to be OK.
My experience is that when you try ‘gem install acts_as_ferret’ again,
the errors go away.

As for changes in environment.rb; you have to add the following line:
require ‘acts_as_ferret’

For more info see: http://projects.jkraemer.net/acts_as_ferret

Cheers,

Mischa.


http://boxroom.rubyforge.org