Forum: Ruby on Rails Application without database.yml

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3d9e26d3be3e7fcf93aca6574bc77a20?d=identicon&s=25 Tushar Gandhi (gandhi-tush)
on 2009-03-31 11:31
Hi,

I have created one application. In that application I am not using any
database.
Whenever I starting rails server it is giving me an error for
configuration of database.yml.
What should I do for this?

Thanks,
Tushar
408a4e38946d3aa2fca0450ec357d06a?d=identicon&s=25 Shuaib Zahda (shuaib85)
on 2009-03-31 11:57
(Received via mailing list)
As far as I concern that rails runs with database.yml

u can use sqlite3 and create an empty database which has no harm on
your application



On Mar 31, 11:31 am, Tushar Gandhi <rails-mailing-l...@andreas-s.net>
059ed46172a087063ce26250e44c8627?d=identicon&s=25 Fernando Perez (fernando)
on 2009-03-31 11:58
> What should I do for this?

Read environment.rb
3d9e26d3be3e7fcf93aca6574bc77a20?d=identicon&s=25 Tushar Gandhi (gandhi-tush)
on 2009-03-31 12:10
Shuaib Zahda wrote:
> As far as I concern that rails runs with database.yml
>
> u can use sqlite3 and create an empty database which has no harm on
> your application
>
>
>
> On Mar 31, 11:31�am, Tushar Gandhi <rails-mailing-l...@andreas-s.net>

I agreed that  there is no harm to create an empty database. Is there no
other way?
Thanks,
Tushar
059ed46172a087063ce26250e44c8627?d=identicon&s=25 Fernando Perez (fernando)
on 2009-03-31 12:13
> I agreed that  there is no harm to create an empty database. Is there no
> other way?

That's lame to install the DB software, configure it, and leave it
empty. Read environment.rb and tell your app to not load ActiveRecord.
F999a7c806afd4b1d53f9fed9a18c704?d=identicon&s=25 Jason Arora (Guest)
on 2009-04-01 05:13
(Received via mailing list)
It is possible to use Rails without a database. This is what Fernando
is referring to:

  # Skip frameworks you're not going to use. To use Rails without a
database
  # you must remove the Active Record framework.
  # config.frameworks -=
[ :active_record, :active_resource, :action_mailer ]

On Mar 31, 3:13 am, Fernando Perez <rails-mailing-l...@andreas-s.net>
3d9e26d3be3e7fcf93aca6574bc77a20?d=identicon&s=25 Tushar Gandhi (gandhi-tush)
on 2009-04-01 06:59
Jason Arora wrote:
> It is possible to use Rails without a database. This is what Fernando
> is referring to:
>
>   # Skip frameworks you're not going to use. To use Rails without a
> database
>   # you must remove the Active Record framework.
>   # config.frameworks -=
> [ :active_record, :active_resource, :action_mailer ]
>
> On Mar 31, 3:13�am, Fernando Perez <rails-mailing-l...@andreas-s.net>

Hi,
I removed comment of the
config.frameworks -=[ :active_record, :active_resource, :action_mailer
].
I removed the database.yml and tried to start the server. I am getting
an error
"uninitialized constant Rails::Plugin::ActiveRecord (NameError)"
I am using rfacebook plugin in this application.
Could you give me the solution for this?
Thanks,
Tushar
661ae6e97d0e16c2af2aaf7d197e8387?d=identicon&s=25 Sijo k g (sijo)
on 2009-04-01 07:33
uncomment like (if you dont need active record) No need to remove
database.yml
config.frameworks -= [ :active_record  ]

     Now restart the server
3d9e26d3be3e7fcf93aca6574bc77a20?d=identicon&s=25 Tushar Gandhi (gandhi-tush)
on 2009-04-01 07:38
Sijo Kg wrote:
> uncomment like (if you dont need active record) No need to remove
> database.yml
> config.frameworks -= [ :active_record  ]
>
>      Now restart the server

Still I am getting same error.
Thanks
Tushar
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-04-01 10:33
(Received via mailing list)
> I am using rfacebook plugin in this application.
> Could you give me the solution for this?

That looks like rfacebook is trying to use the database. If it
genuinely needs this then you;ll have to setup a database for your
app.

Fred
This topic is locked and can not be replied to.