Re: within my app, a login is not working

2009-01-08 Thread Paul Clegg
The database on the Heroku side is not the same as what you use on your
local development, regardless of whether or not your sqlite database is
checked in or not (it probably shouldn't be).  Heroku uses a Postgres
database, which will, by definition, be separate and different than your
local development Sqlite database.  So it's probably failing because your
login data doesn't exist on the Heroku side of things.

...Paul

On Thu, Jan 8, 2009 at 12:55 PM, HazardJ james.g.haz...@gmail.com wrote:


 Hi everyone,

 Heroku is really great.  So good that I was able to upload and get my
 application working, though I'm very, very inexperienced.  Bravo.
 I've got a problem that escapes me -- when I reinstalled the app
 (tarballed upload) my login _within_the_app (SessionsController) won't
 let me log in anymore.  It doesn't like any of the user / password
 combinations.
 The /session page comes up but I go into a samsara of login where it
 gently declines to accept any of my user/password combinations.
 As I was uploading the many different times, I did get some kind of
 error a few times.  But others were smooth, including the most
 recent.

 Tests I've done so far:
 I've checked the original on my computer (0.0.0.0:3000).  It works
 fine.
 I've tarballed in tar.gz (both with log and tmp and without) and
 in .zip any number of times.  No luck.
 I'm used to making mistakes and have tried it over and again.
 The files seem to all be there, including the sqlite3 file.

 Any thoughts?
 Thanks, James
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: within my app, a login is not working

2009-01-08 Thread HazardJ

Thanks very much.  I confirmed that you are right by getting rid of
the login -- the database is indeed empty of my document content.  I
presume that to get local and Heroku to work alike I need to use
Postgres locally?  And then git from one to the other?  Is there a
simpler way of getting information from sqlite to Postgres?



On Jan 8, 2:22 pm, Paul Clegg dotdotdotp...@gmail.com wrote:
 The database on the Heroku side is not the same as what you use on your
 local development, regardless of whether or not your sqlite database is
 checked in or not (it probably shouldn't be).  Heroku uses a Postgres
 database, which will, by definition, be separate and different than your
 local development Sqlite database.  So it's probably failing because your
 login data doesn't exist on the Heroku side of things.

 ...Paul

 On Thu, Jan 8, 2009 at 12:55 PM, HazardJ james.g.haz...@gmail.com wrote:

  Hi everyone,

  Heroku is really great.  So good that I was able to upload and get my
  application working, though I'm very, very inexperienced.  Bravo.
  I've got a problem that escapes me -- when I reinstalled the app
  (tarballed upload) my login _within_the_app (SessionsController) won't
  let me log in anymore.  It doesn't like any of the user / password
  combinations.
  The /session page comes up but I go into a samsara of login where it
  gently declines to accept any of my user/password combinations.
  As I was uploading the many different times, I did get some kind of
  error a few times.  But others were smooth, including the most
  recent.

  Tests I've done so far:
  I've checked the original on my computer (0.0.0.0:3000).  It works
  fine.
  I've tarballed in tar.gz (both with log and tmp and without) and
  in .zip any number of times.  No luck.
  I'm used to making mistakes and have tried it over and again.
  The files seem to all be there, including the sqlite3 file.

  Any thoughts?
  Thanks, James
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: within my app, a login is not working

2009-01-08 Thread shenry

You can add records to your database through the heroku console, as
you would locally.

On Jan 8, 2:50 pm, HazardJ james.g.haz...@gmail.com wrote:
 Thanks very much.  I confirmed that you are right by getting rid of
 the login -- the database is indeed empty of my document content.  I
 presume that to get local and Heroku to work alike I need to use
 Postgres locally?  And then git from one to the other?  Is there a
 simpler way of getting information from sqlite to Postgres?

 On Jan 8, 2:22 pm, Paul Clegg dotdotdotp...@gmail.com wrote:

  The database on the Heroku side is not the same as what you use on your
  local development, regardless of whether or not your sqlite database is
  checked in or not (it probably shouldn't be).  Heroku uses a Postgres
  database, which will, by definition, be separate and different than your
  local development Sqlite database.  So it's probably failing because your
  login data doesn't exist on the Heroku side of things.

  ...Paul

  On Thu, Jan 8, 2009 at 12:55 PM, HazardJ james.g.haz...@gmail.com wrote:

   Hi everyone,

   Heroku is really great.  So good that I was able to upload and get my
   application working, though I'm very, very inexperienced.  Bravo.
   I've got a problem that escapes me -- when I reinstalled the app
   (tarballed upload) my login _within_the_app (SessionsController) won't
   let me log in anymore.  It doesn't like any of the user / password
   combinations.
   The /session page comes up but I go into a samsara of login where it
   gently declines to accept any of my user/password combinations.
   As I was uploading the many different times, I did get some kind of
   error a few times.  But others were smooth, including the most
   recent.

   Tests I've done so far:
   I've checked the original on my computer (0.0.0.0:3000).  It works
   fine.
   I've tarballed in tar.gz (both with log and tmp and without) and
   in .zip any number of times.  No luck.
   I'm used to making mistakes and have tried it over and again.
   The files seem to all be there, including the sqlite3 file.

   Any thoughts?
   Thanks, James
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: within my app, a login is not working

2009-01-08 Thread Keenan Brock

Hi

If you put those methods into your model, the rails console acts as  
your admin interface. There you can create some logins.

You can also use migrations to create those users for you. It would be  
the same code, just one would be run manually and the other  
automatically.

Dave Thomas said the pragmatic programmer book store only had a  
console admin interface for years. Not sure if hey have even added a  
web admin interface.

You can access the console as an option in the lower left corner of  
the edit interface

Hope that helps
Keenan


On Jan 8, 2009, at 3:55 PM, HazardJ james.g.haz...@gmail.com wrote:


 Hi everyone,

 Heroku is really great.  So good that I was able to upload and get my
 application working, though I'm very, very inexperienced.  Bravo.
 I've got a problem that escapes me -- when I reinstalled the app
 (tarballed upload) my login _within_the_app (SessionsController) won't
 let me log in anymore.  It doesn't like any of the user / password
 combinations.
 The /session page comes up but I go into a samsara of login where it
 gently declines to accept any of my user/password combinations.
 As I was uploading the many different times, I did get some kind of
 error a few times.  But others were smooth, including the most
 recent.

 Tests I've done so far:
 I've checked the original on my computer (0.0.0.0:3000).  It works
 fine.
 I've tarballed in tar.gz (both with log and tmp and without) and
 in .zip any number of times.  No luck.
 I'm used to making mistakes and have tried it over and again.
 The files seem to all be there, including the sqlite3 file.

 Any thoughts?
 Thanks, James
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: within my app, a login is not working

2009-01-08 Thread James Hazard
Thanks for all the responses!
I'm working from within a world of code I don't understand well.
After an extremely rich learning experience, I discovered that I could seed
the user database from the console with:

User.new(:login = 'admin', :email = 'admin', :password = 'mypswd',
:password_confirmation = 'mypswd').save

This worked to give me access while maintaining the existing password
system.

I also tried Heroku's suggestion of making a database.yml, but stumbled on
the rake db:data:dump, command, but rake said it didn't know how to build
the task.  That would be really useful as a way of getting all the documents
I've got out of the local database and onto Heroku.

In any event, I learned about authentication, git, console, and others on
the way.

Thanks to all!



On Thu, Jan 8, 2009 at 4:08 PM, Keenan Brock kee...@thebrocks.net wrote:


 Hi

 If you put those methods into your model, the rails console acts as
 your admin interface. There you can create some logins.

 You can also use migrations to create those users for you. It would be
 the same code, just one would be run manually and the other
 automatically.

 Dave Thomas said the pragmatic programmer book store only had a
 console admin interface for years. Not sure if hey have even added a
 web admin interface.

 You can access the console as an option in the lower left corner of
 the edit interface

 Hope that helps
 Keenan


 On Jan 8, 2009, at 3:55 PM, HazardJ james.g.haz...@gmail.com wrote:

 
  Hi everyone,
 
  Heroku is really great.  So good that I was able to upload and get my
  application working, though I'm very, very inexperienced.  Bravo.
  I've got a problem that escapes me -- when I reinstalled the app
  (tarballed upload) my login _within_the_app (SessionsController) won't
  let me log in anymore.  It doesn't like any of the user / password
  combinations.
  The /session page comes up but I go into a samsara of login where it
  gently declines to accept any of my user/password combinations.
  As I was uploading the many different times, I did get some kind of
  error a few times.  But others were smooth, including the most
  recent.
 
  Tests I've done so far:
  I've checked the original on my computer (0.0.0.0:3000).  It works
  fine.
  I've tarballed in tar.gz (both with log and tmp and without) and
  in .zip any number of times.  No luck.
  I'm used to making mistakes and have tried it over and again.
  The files seem to all be there, including the sqlite3 file.
 
  Any thoughts?
  Thanks, James
  

 



-- 
James G. Hazard
540 University Ave, Suite 300
Palo Alto, CA  94301
j...@hazardj.com
650.204.9100 (voice); 650.204.9101 (fax)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: within my app, a login is not working

2009-01-08 Thread Keenan Brock

James,

My suggestion is to run sqlite locally.

Only if you are using a lot of raw SQL would I suggest postgress  
locally.

I can see why someone would suggest the opposite. But why not just  
focus on rails for now? Once it becomes a big time app, then worry  
about the version of the database.

Indexes however, do need attention. Not today. But soon. Good news is  
migrations handle those in a database neutral way.

Beat of luck,
Keenan

On Jan 8, 2009, at 5:50 PM, HazardJ james.g.haz...@gmail.com wrote:


 Thanks very much.  I confirmed that you are right by getting rid of
 the login -- the database is indeed empty of my document content.  I
 presume that to get local and Heroku to work alike I need to use
 Postgres locally?  And then git from one to the other?  Is there a
 simpler way of getting information from sqlite to Postgres?



 On Jan 8, 2:22 pm, Paul Clegg dotdotdotp...@gmail.com wrote:
 The database on the Heroku side is not the same as what you use on  
 your
 local development, regardless of whether or not your sqlite  
 database is
 checked in or not (it probably shouldn't be).  Heroku uses a Postgres
 database, which will, by definition, be separate and different than  
 your
 local development Sqlite database.  So it's probably failing  
 because your
 login data doesn't exist on the Heroku side of things.

 ...Paul

 On Thu, Jan 8, 2009 at 12:55 PM, HazardJ james.g.haz...@gmail.com  
 wrote:

 Hi everyone,

 Heroku is really great.  So good that I was able to upload and get  
 my
 application working, though I'm very, very inexperienced.  Bravo.
 I've got a problem that escapes me -- when I reinstalled the app
 (tarballed upload) my login _within_the_app (SessionsController)  
 won't
 let me log in anymore.  It doesn't like any of the user / password
 combinations.
 The /session page comes up but I go into a samsara of login where it
 gently declines to accept any of my user/password combinations.
 As I was uploading the many different times, I did get some kind of
 error a few times.  But others were smooth, including the most
 recent.

 Tests I've done so far:
 I've checked the original on my computer (0.0.0.0:3000).  It works
 fine.
 I've tarballed in tar.gz (both with log and tmp and without) and
 in .zip any number of times.  No luck.
 I'm used to making mistakes and have tried it over and again.
 The files seem to all be there, including the sqlite3 file.

 Any thoughts?
 Thanks, James
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: within my app, a login is not working

2009-01-08 Thread James Hazard
Hi Keenan,
My thought about Postgres was because I am trying to have the same data
locally as at Heroku.  Heroku uses Postgres, I thought I needed to match
it.  Now I understand that it is possible to synchonize using yaml_db to
export sqlite data to a data.yml, then upload it to Heroku, though I wasn't
able to get it to work.
Thanks for the comment.  James

On Thu, Jan 8, 2009 at 7:42 PM, Keenan Brock kee...@thebrocks.net wrote:


 James,

 My suggestion is to run sqlite locally.

 Only if you are using a lot of raw SQL would I suggest postgress
 locally.

 I can see why someone would suggest the opposite. But why not just
 focus on rails for now? Once it becomes a big time app, then worry
 about the version of the database.

 Indexes however, do need attention. Not today. But soon. Good news is
 migrations handle those in a database neutral way.

 Beat of luck,
 Keenan

 On Jan 8, 2009, at 5:50 PM, HazardJ james.g.haz...@gmail.com wrote:

 
  Thanks very much.  I confirmed that you are right by getting rid of
  the login -- the database is indeed empty of my document content.  I
  presume that to get local and Heroku to work alike I need to use
  Postgres locally?  And then git from one to the other?  Is there a
  simpler way of getting information from sqlite to Postgres?
 
 
 
  On Jan 8, 2:22 pm, Paul Clegg dotdotdotp...@gmail.com wrote:
  The database on the Heroku side is not the same as what you use on
  your
  local development, regardless of whether or not your sqlite
  database is
  checked in or not (it probably shouldn't be).  Heroku uses a Postgres
  database, which will, by definition, be separate and different than
  your
  local development Sqlite database.  So it's probably failing
  because your
  login data doesn't exist on the Heroku side of things.
 
  ...Paul
 
  On Thu, Jan 8, 2009 at 12:55 PM, HazardJ james.g.haz...@gmail.com
  wrote:
 
  Hi everyone,
 
  Heroku is really great.  So good that I was able to upload and get
  my
  application working, though I'm very, very inexperienced.  Bravo.
  I've got a problem that escapes me -- when I reinstalled the app
  (tarballed upload) my login _within_the_app (SessionsController)
  won't
  let me log in anymore.  It doesn't like any of the user / password
  combinations.
  The /session page comes up but I go into a samsara of login where it
  gently declines to accept any of my user/password combinations.
  As I was uploading the many different times, I did get some kind of
  error a few times.  But others were smooth, including the most
  recent.
 
  Tests I've done so far:
  I've checked the original on my computer (0.0.0.0:3000).  It works
  fine.
  I've tarballed in tar.gz (both with log and tmp and without) and
  in .zip any number of times.  No luck.
  I'm used to making mistakes and have tried it over and again.
  The files seem to all be there, including the sqlite3 file.
 
  Any thoughts?
  Thanks, James
  

 



-- 
James G. Hazard
540 University Ave, Suite 300
Palo Alto, CA  94301
j...@hazardj.com
650.204.9100 (voice); 650.204.9101 (fax)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---