Closed jakehockey10 closed 9 years ago
I've ran into same issue...any updates on this issue?
It seems like it is a problem with simple form, have you tried updating it?
$ bundle update simple_form
Yes, and i have: Ruby 2.1.3, Rails 4.1.7, Simple Form 3.1.0
Showing /.rvm/gems/ruby-2.1.3@appapi/bundler/gems/sabisu-rails-de6340971e70/app/views/sabisu_rails/explorer/index.html.erb where line #36 raised:
<div class="appeareable">
<% @explorer.resource_columns.each do |column| %>
<%= f.input column, input_html: {name: "#{@explorer.resource_name}[#{column}]" }, as: @explorer.column_type(column), required: @explorer.required_attribute?(column) %>
<% end %>
</div>
Request
Parameters:
{"explorer"=>{"resource"=>"users"}}
same issue, tried updating simple_form, no results. @albertpak did you ever find a solution?
Everything looks fine, I cannot reproduce the error, the only thing different is the rails version, have you tried to use 4.0 instead of 4.1?
Ah, that might be it. I'm currently using Rails 4.2. Will try 4.0 and get back to you. Thank you for looking into it.
I am facing the same issue. I have event tried downgrading to Rails 4.0 (major inconvenience) but this issue still persists. any leads yet?
\ i was using Rails 4.1.7, i think its best if I upgraded back to that
Same issue, Ruby 2.1.2, Rails 4.2.0, simple_form 3.1.0.
While this is being resolved, is there a good temporary solution?
@Niteshvgupta sorry for late response, i didnt, i got into swagger docs, and then ended up using Postman for my local dev
@rgpass I use the api_taster
gem now. Its pretty covenient
Try locking out some of the gems to something like:
gem 'compass-rails', '1.1.7'
gem 'simple_form', '3.0.2'
Let me know how it goes!
I'm going through the API tutorial and just ran into this same issue. I tried locking out the compass and simple_form gems, but there are dependencies that start to fall apart using rails 4.1.4 and ruby 2.1.5.
it looks like it's trying to render a resource named 'inet', but i can't find that anywhere in the gem code or even referenced anywhere on google.
if i take out the following code, the UI renders ok, but it's obviously missing stuff.
<div class="appeareable">
<% @explorer.resource_columns.each do |column| %>
<%= f.input column, input_html: {name: "#{@explorer.resource_name}[#{column}]" }, as: @explorer.column_type(column), required: @explorer.required_attribute?(column) %>
<% end %>
</div>
if you want my repo, it's here: http://github.com/jakeatwork/market_place_api
ok...i found a (possible) solution...it appears that rails 4 sets IP addresses as an INET data type in the db. it seems simple_form doesn't know how to render this data type. IPs used to be strings (varchar 255 in postgres) and so converting the db to string for the 2 IP fields in the user table (current_sign_in_ip and last_sign_in_ip) at least let's the UI render, but now it's not displaying the results (though I see the data rendering in the logs). give that a try.
found info on: https://blog.engineyard.com/2013/new-in-rails-4 (ctrl-f for inet)
everything is now working for me now...the json wasn't displaying in the sabisu ui for some reason and i deleted the old marketplaceapi link in ~/.pow and relinked it.
if it works for you, please mark my stackoverflow answer as correct if you would be so kind: http://stackoverflow.com/questions/29340177/cant-get-sabisu-gem-to-render-shows-no-input-found-for-inet-error/29340178#29340178
Great job!, If you could just add the commands to add the migration to make others life easier, that would be sweet! Thanks!
@kurenn thanks...and i updated the answer with the following:
I did this by adding a new migration:
rails g migration change_ip_columns_in_users_table
Then I edited the migration file:
class ChangeIpColumnsInUsersTable < ActiveRecord::Migration
def change
change_column :users, :current_sign_in_ip, :string
change_column :users, :last_sign_in_ip, :string
end
end
Sweet, I'll close this issue then! thanks @jakeatwork
from simpleform team - a more simple, and less 'destructive' approach while they figure out if they're going to build in the mapping:
We could simply map them to strings, as I did in this experimental branch some time ago.
Meanwhile you can map those yourself, or pass as: :string on these input fields.
Hello,
When I go to the url http://localhost:3000/sabisu_rails/explorer, I get an error that reads 'No input found for inet'.
I have a feeling that my gem versions are slightly different and are the cause to this problem, so here is my Gemfile.lock:
I'm fairly used to 4.1.8 and have been playing with 4.2.0.beta#, so I don't necessarily want to downgrade to 4.0 like in the tutorial I'm following here: http://apionrails.icalialabs.com/book. Does anyone know what I can do to use the sabisu rails api explorer without having to downgrade anything? Or is that my only option? If so, what do I need to downgrade, exactly? Thanks!