-1

can someone help me google a tutorial how to access the data that was inserted into a rails app.

group :development do
  gem 'sqlite3'
end
group :production do
  gem 'pg'
end

I know this is where it is stored, just could not find a good step by step tutorial. Thx, Bumbledebee

megas
  • 21,401
  • 12
  • 79
  • 130
  • 1
    It would be better to include more detail in your question by editing it - try quoting your config/database.yml (omitting passwords of course), so that people can be sure which data is stored where - your GemFile is hinting it is sqlite for dev and pg for production, but really your config/database.yml file will tell us, and specify which environment you're trying to get data from and what you want to do with it, i.e. are you trying to move data from dev (sqlite3) to production on a server (using psql)? You will probably find long-term you should use one db for both dev and production. – Kenny Grant Sep 17 '12 at 21:34

2 Answers2

2

It depends on what "access" means to you and you forgot to mention your OS.

For things like inspecting rows you created you can use rails console as suggested here:

How to access default Rails sqlite db?

If you want to view the database table you can also try looking here

how to view PostgreSQL database on windows 7?

Which suggests pgAdmin for Postgresql

If you want to access sqlite database you can try

SQLite browser http://sourceforge.net/projects/sqlitebrowser/

Community
  • 1
  • 1
Mono
  • 302
  • 2
  • 6
  • 21
  • Hi thanks everyone, actually I used rails console and this one https://github.com/ddollar/heroku-sql-console in the end. – user1678071 Oct 23 '12 at 14:00
1

I recommend you to check out railscasts.com, as there are plenty of guides for beginners in Rails.

David Morales
  • 17,816
  • 12
  • 77
  • 105