You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I've been trying out Padrino with a plan to convert couple of restful web services written in plain Sinatra to take advantage of features offered in Padrino. To learn about Padrino, I started with a the sample blog tutorial and ran into a couple of issues with ORMs:
First Issue.
Using AR as the ORM, setting up Admin panel throws an error after the sample username and password is entered. Here is the initial command I entered:
bundle exec rake ar:create ar:migrate seed
DEBUG - ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
DEBUG - ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
Which email do you want use for logging into admin? test@foo.com
Tell me the password to use: bar123
DEBUG - (0.2ms) begin transaction
DEBUG - Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE LOWER("accounts"."email") = LOWER('test@foo.com') LIMIT 1
DEBUG - SQL (3.3ms) INSERT INTO "accounts" ("created_at", "crypted_password", "email", "name", "role", "surname", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-04-09 14:21:43.438626"], ["crypted_password", "$2a$10$ct68qhwdjk5866PsRe1Dy.Mv6zupFQnYuE29VO/0mV4NTsP0Io416"], ["email", "test@foo.com"], ["name", "Foo"], ["role", "admin"], ["surname", "Bar"], ["updated_at", "2014-04-09 14:21:43.438626"]]
DEBUG - (12.3ms) commit transaction
DEBUG - Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE (LOWER("accounts"."email") = LOWER('test@foo.com') AND "accounts"."id" != 1) LIMIT 1
=================================================================
Account has been successfully created, now you can login with:
=================================================================
email: test@foo.com
password: bar123
=================================================================
When I login to the admin panel using the password, I see the following error:
application error ArgumentError at /admin/sessions/create invalid value for Integer(): "{:conditions=>["lower(email) = lower(?)""
file: database_statements.rb
location: Integer
line: 332
Here is my ruby and Gemlock file for version of components I'm using:
I switched to sequel to attempt to reproduce this issue with another ORM - I had the suspicion that AR is causing this based on the backtrace, so went with Sequel and SQLite to test it. I used the bundle exec rake sq:create sq:migrate seed which reports that Sequel create is not supported. How to work around that?
My applications use MySQL for one service and Mongo for another and I need to try out both those ORM and sample applications on Padrino before rewriting. Any help on these issues is greatly appreciated.
Thanks,
Ajith
The text was updated successfully, but these errors were encountered:
Hello,
I've been trying out Padrino with a plan to convert couple of restful web services written in plain Sinatra to take advantage of features offered in Padrino. To learn about Padrino, I started with a the sample blog tutorial and ran into a couple of issues with ORMs:
First Issue.
Using AR as the ORM, setting up Admin panel throws an error after the sample username and password is entered. Here is the initial command I entered:
Output:
When I login to the admin panel using the password, I see the following error:
application error
ArgumentError at /admin/sessions/create
invalid value for Integer(): "{:conditions=>["lower(email) = lower(?)""
file: database_statements.rb
location: Integer
line: 332
Here is my ruby and Gemlock file for version of components I'm using:
Second Issue
I switched to sequel to attempt to reproduce this issue with another ORM - I had the suspicion that AR is causing this based on the backtrace, so went with Sequel and SQLite to test it. I used the bundle exec rake sq:create sq:migrate seed which reports that Sequel create is not supported. How to work around that?
My applications use MySQL for one service and Mongo for another and I need to try out both those ORM and sample applications on Padrino before rewriting. Any help on these issues is greatly appreciated.
Thanks,
Ajith
The text was updated successfully, but these errors were encountered: