<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - How can I connect to existing database]]></title>
		<link>http://railsforum.com/viewtopic.php?id=49518</link>
		<description><![CDATA[The most recent posts in How can I connect to existing database.]]></description>
		<lastBuildDate>Tue, 17 Jul 2012 07:03:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How can I connect to existing database]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=153993#p153993</link>
			<description><![CDATA[<p>Post the error you have, it is really difficult to guess the reason.<br />You can try to play a little bit in the rails console:<br /></p><div class="codebox"><pre><code>#cd to your application folder
rails c
#you&#039;ll get a prompt line to enter commands
#displaying all the customers (like select * from customers)
all_customers = Customer.all 
#you will get either a customers array or an empty array if there is no one in the DB.
#hit &#039;exit&#039; to quit the rails console</code></pre></div><p>If everything is OK, check the routes.rb file for available routes or run in the terminal/console from the application folder:<br /></p><div class="codebox"><pre><code>rake routes</code></pre></div><p>See more details at Rails guides: <a href="http://guides.rubyonrails.org/">http://guides.rubyonrails.org/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Javix)]]></author>
			<pubDate>Tue, 17 Jul 2012 07:03:55 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=153993#p153993</guid>
		</item>
		<item>
			<title><![CDATA[Re: How can I connect to existing database]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=153984#p153984</link>
			<description><![CDATA[<p>I think I will need help on this. I cant display data from database.</p><p>rails new demo<br />cd demo<br />change .yml to path of external SQLite database<br />rake db:migrate<br />rails generate model Customer id:integer first_name:string last_name:string<br />rails generate controller Customer index</p><p>I don&#039;t know what to do from there in controller to display the info for view.&nbsp; I have tried examples but I get a get error in browser.</p>]]></description>
			<author><![CDATA[dummy@example.com (Lluvain)]]></author>
			<pubDate>Mon, 16 Jul 2012 20:01:21 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=153984#p153984</guid>
		</item>
		<item>
			<title><![CDATA[Re: How can I connect to existing database]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=153968#p153968</link>
			<description><![CDATA[<p>Rails guides is your friend: <a href="http://guides.rubyonrails.org/">http://guides.rubyonrails.org/</a> as well as Rails API: <a href="http://api.rubyonrails.org/.">http://api.rubyonrails.org/.</a><br />See also Michael Hartl&#039;s tutorial for more details: <a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book">http://ruby.railstutorial.org/ruby-on-r &#133; orial-book</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Javix)]]></author>
			<pubDate>Sun, 15 Jul 2012 19:41:33 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=153968#p153968</guid>
		</item>
		<item>
			<title><![CDATA[How can I connect to existing database]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=153966#p153966</link>
			<description><![CDATA[<p>Hello community,</p><p>This is my first post and first time getting into ruby on rails.&nbsp; I am a novice and ran into rails when experimenting with Spiceworks.&nbsp; I decided to learn rails since Spiceworks was built off this technology and I wanted to learn more about how Spiceworks runs in the background.&nbsp; Well things spead up pretty fast on getting features to work since certain things do not run out the box.&nbsp; I know to do something big you need to start small but I do not have the luxury because of time constrants. I bought a book Agile Web Development with Rails and got to chapter 6 in one day because it has been that addictive. I never liked command line until this language.&nbsp; </p><p>I can pick up the syntax soon enough but I want to at least get one skill down because I will need to demonstrate the advantage of using this technology in my enviroment versus something I already created in .net. </p><p>Is there some step by step tutorial to connect to an external database that runs off of SQLite.&nbsp; Spiceworks runs off SQLite and we have data I want to pull into my site.&nbsp; If anyone can help I would appreciate it. Remember I am a novice <img src="http://railsforum.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Lluvain)]]></author>
			<pubDate>Sun, 15 Jul 2012 17:34:31 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=153966#p153966</guid>
		</item>
	</channel>
</rss>
