codeforamerica / ohana-api

The open source API directory of community social services.
http://ohana-api-demo.herokuapp.com/api
BSD 3-Clause "New" or "Revised" License
185 stars 344 forks source link

Sign Up Error: Name can't be blank #164

Closed devinbalkind closed 10 years ago

devinbalkind commented 10 years ago

We've deployed an instance of the Ohana API at http://services.nycprepared.org:8080/

When I try to sign up as a user I receive the following error:

1 error prohibited this user from being saved: Name can't be blank

I receive the same error when attempting to register for the demo site at http://ohana-api-demo.herokuapp.com

I've tried using names that with are a single word, multiple words, with capitalized first letters and without.

Thanks.

monfresh commented 10 years ago

Thanks for the report! I'll look into it.

monfresh commented 10 years ago

Fixed! Please pull latest code and try again.

devinbalkind commented 10 years ago

Thanks. I just tried to sign up at http://ohana-api-demo.herokuapp.com/users/sign_up. When I clicked "sign up" it sent me to this page http://ohana-api-demo.herokuapp.com/users and gave me the following message:

We're sorry, but something went wrong. If you are the application owner, check the logs for more information.

monfresh commented 10 years ago

Sorry about that. I should have checked the demo site. It's fixed for real now. I just verified on the demo site.

devinbalkind commented 10 years ago

Great thanks. Worked for me as well. Now I have to figure out how this thing works. :)

monfresh commented 10 years ago

I took a look at your instance and it looks like you've just deployed with the sample data that the API comes with — which is a great first step which shows the code and deployment instructions are working — but I'm assuming that you'll want to use NYC data at some point, right?

Also, the home page of the API (where you've been trying to sign up) is a developer portal for people who will want to build apps using NYC data. The idea is that once you've deployed an instance of the API with NYC data that's in a state that's ready to be consumed by other developers who want to build useful things with the data, then you would let them know about the API site and ask them to sign up. Does that make sense?

The most important step in the process of deploying your own instance of the API is to populate the database with your own data. The installation instructions go through everything step by step. Let me know what's not clear or what it is you're trying to figure out about how this works.

devinbalkind commented 10 years ago

On Sat, May 31, 2014 at 8:05 PM, Moncef Belyamani notifications@github.com wrote:

I took a look at your instance and it looks like you've just deployed with the sample data that the API comes with — which is a great first step which shows the code and deployment instructions are working — but I'm assuming that you'll want to use NYC data at some point, right?

Yep. That data is currently here: https://www.google.com/fusiontables/DataSource?docid=1HBVrZGaf9KBi15pBSw2CCv19slIJwVQxcySIogLL#rows:id=1

Also, the home page of the API (where you've been trying to sign up) is a developer portal for people who will want to build apps using NYC data. The idea is that once you've deployed an instance of the API with NYC data that's in a state that's ready to be consumed by other developers who want to build useful things with the data, then you would let them know about the API site and ask them to sign up. Does that make sense?

Yep. And the ruby wrapper is one such app - right. https://github.com/codeforamerica/ohanakapa-ruby

The most important step in the process of deploying your own instance of the API is to populate the database with your own data. The installation instructions https://github.com/codeforamerica/ohana-api/blob/master/INSTALL.md go through everything step by step. Let me know what's not clear or what it is you're trying to figure out about how this works.

I converted a csv of my data intio json using http://www.convertcsv.com/csv-to-json.htm

The difference between how my file looks and how your sample dataset looks is pretty is massive. Do you have spreadsheet templates I could model my spreadsheet off of or some other tool(s) for making my data conform to Ohana's JSON format? Or maybe I'm missing something and should just import my json and see what happens?

Thanks for the help.

— Reply to this email directly or view it on GitHub https://github.com/codeforamerica/ohana-api/issues/164#issuecomment-44763848 .

Devin Balkind Founder & Director, Sarapis http://sarapis.org Lead Coordinator, NYC:Prepared http://nycprepared.org 134 Spring St, Suite 302 New York, NY, 10012 m.917.748.1048 devin@sarapis.org

devinbalkind commented 10 years ago

Also - here's a link to our JSON file that was converted from our CSV spreadsheet: https://drive.google.com/file/d/0B7hSktWsQi1VUVJxUU1mSUNFcXc/edit?usp=sharing

monfresh commented 10 years ago

Converting a flat CSV file to JSON using a tool like csv-to-json will not work. You'll either have to create separate CSV files to define the various relationships, as described in the OpenReferral specification, or you'll have to write your own custom script that will parse your CSV file and output JSON that conforms with the format that Ohana API expects.

We don't have script templates for converting data to JSON because every case is different. However, I believe @spara was working on templates for CSV files to show you how you would organize your data into separate spreadsheets.

monfresh commented 10 years ago

Also, our Ruby wrapper is not an example of an app that can be built on top of the data. The wrapper itself does not consume any data. It's a tool that makes it easier to write Ruby applications that communicate with the API.

Examples of such Ruby applications are our Web Search, and our Admin Interface.

devinbalkind commented 10 years ago

Our spreadsheet lines up very closely to the OR spec so tweaking it to fit with what's outlined at the page you linked to is very possible for us - but of course there are some questions pertaining to how to do that:

I'm sure I'll come up with more questions throughout the process. Should I move this questions to another thread?

Also - @spara spreadsheet templates would be immensely helpful for us. Please let me know if you have anything like that.

Thanks.

monfresh commented 10 years ago

Yes, please open one or more new issues with these questions on the OpenReferral repo. Thanks!

devinbalkind commented 10 years ago

Done

Thanks.