top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Problem with rake db:populate with Rails Application

0 votes
311 views

I am having problems populating my db. I created a sample_data.rake file. When I run rake db:populate it shows exactly what it should show- no errors. But when I go to localhost and try to login the db has not been populated. Any suggestions??

posted Aug 12, 2013 by Amit Parthsarthi

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Are you sure you are populating the same database that you are using at run time? Use mysql (or whatever db you are using) command line or other utility to check whether the db has the correct data.

answer Aug 12, 2013 by Sheetal Chauhan
Similar Questions
0 votes

I am getting certificate errors on the https:\rubygems.org web site using 2.1.5 Rails install environment objects.
Any ideas? This is Windows 7 VM machine installation.

0 votes

I have a problem when I try to use jQuery simpleZoom Plugin in rails. I want to use it when select image from database, how can I do it?

0 votes

I have built a rails application with jruby. Since I have no experience with deploying a rails application in a production environment, I have spent some time doing a manual deployment on a linux server with tomcat6 as application server.

In essence, I have made a war file of the rails application with help of the warbler gem and deployed that on the linux server. I managed to get it up and running, but not yet exactly as I need it to be.

I have still some configuration issues. I hope you can help me or point me to the right place, since it may be a tomcat question. But I assume there must be some rails/tomcat expertise among the members of this group...

The point is, the URL in the development server is localhost:3000/invoices (using rails server)
The URL in the tomcat production environment is localhost:8080/rails/invoices

I can't seem to figure out how I can change the port and the document root (/invoices instead of /rails/invoices) in tomcat.

Any suggestions?

+7 votes

I am trying to get google-geo to work, but I am seeing errors.

#!/usr/bin/ruby

require 'Google-geo'

mykey = 'blahblahblah'
addy1 = 'xxxxxxxxxxxxx' # xx, yy

geo = Google::Geo.new mykey
res = geo.locate addy1
puts res.coordinates

...and the error:

/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- Google-geo (LoadError) from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from pdev.rb:6:in `'

Not sure why it can't load it as it's just installed. I can't get anything to work in irb either.

+1 vote

I am building a simple application that will be used internally by a 20 people within an organization.

In the first instance they will need to sign up with their email address. When the app is ready to go live with full features, they will receive an email providing them with the password to log in.

What is important to note that all 20 users will be using the SAME PASSWORD and the password is to be set at a later date.

I would appreciate any advice on how best to do this without them having to select the password in the pre-registration phase. I will be using Action Mailer and have also come across the Lock Gem but it would be really helpful to talk through a few solutions.

...