# Problem in importing database into Postgresql

**URL:** <https://www.ruby-forum.com/t/problem-in-importing-database-into-postgresql/90299>\
**Category:** Rails\
**Created:** [March 27, 2007, 3:54pm UTC](https://www.ruby-forum.com/t/problem-in-importing-database-into-postgresql/90299 "2007-03-27T15:54:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![veeraa2003](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Post date:** [March 27, 2007, 3:54pm UTC](https://www.ruby-forum.com/t/problem-in-importing-database-into-postgresql/90299/1 "2007-03-27T15:54:42Z")

</div>

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:in`require’  
/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:in`new\_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:in`load\_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:in`silence\_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:in`load\_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:in`process’  
/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:in`require’  
/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:in`execute’  
/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:in`synchronize’  
/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:in`invoke\_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:in`invoke\_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:in`synchronize’  
/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:in`invoke\_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:in`invoke\_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:in`synchronize’  
/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:in`run’  
/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…

---

<div class="post-metadata">

**Author:** ![veeraa2003](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Post date:** [March 27, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/problem-in-importing-database-into-postgresql/90299/2 "2007-03-27T19:48:25Z")

</div>

> no such file to load – ferret

gem install ferret

---

<div class="post-metadata">

**Author:** ![veeraa2003](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Post date:** [March 27, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/problem-in-importing-database-into-postgresql/90299/3 "2007-03-27T20:35:39Z")

</div>

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](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](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

---

<div class="post-metadata">

**Author:** ![veeraa2003](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Post date:** [March 27, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/problem-in-importing-database-into-postgresql/90299/4 "2007-03-27T22:22:40Z")

</div>

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](http://projects.jkraemer.net/acts_as_ferret)
> 
> Cheers,
> 
> Mischa.
> 
> –  
> [http://boxroom.rubyforge.org](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](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:in `const\_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:in `require’  
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:in `require’  
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:in `require’  
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

---

<div class="post-metadata">

**Author:** ![veeraa2003](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Post date:** [March 27, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/problem-in-importing-database-into-postgresql/90299/5 "2007-03-27T22:18:53Z")

</div>

> 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](http://projects.jkraemer.net/acts_as_ferret)

Cheers,

Mischa.

–  
[http://boxroom.rubyforge.org](http://boxroom.rubyforge.org)
