Closed byzatwuer closed 7 years ago
config aplications.rb I added this code @prathmeshranaut
### require 'socket'
require 'ipaddr'
config.web_console.whitelisted_ips = Socket.ip_address_list.reduce([]) do |res, addrinfo|
addrinfo.ipv4? ? res << IPAddr.new(addrinfo.ip_address).mask(24) : res
end
error It changed in this way
### Started POST "/api/v1/user" for 176.55.165.228 at 2017-04-08 11:56:19 -0400
ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by UserController#create_user as HTML
Parameters: {"phone"=>"2bfcc3088526737b", "android_version"=>"22", "device_info"=>"htc HTC Desire 830", "version"=>"v1", "user"=>{}}
Can't verify CSRF token authenticity
Unpermitted parameters: phone, android_version, device_info, version, user
User Load (0.3ms) SELECT "users".* FROM "users" LIMIT 1
(0.1ms) BEGIN
(0.1ms) ROLLBACK
(0.0ms) BEGIN
(0.1ms) ROLLBACK
Completed 501 Not Imp
Can't verify CSRF token authenticity
This is the issue.
Check this out : http://stackoverflow.com/questions/27393694/ruby-on-rails-json-rest-api-csrf-token
I did not understand. What am I going to do now I am new to ruby @prathmeshranaut
please help me. @prathmeshranaut
Add this line
skip_before_filter :verify_authenticity_token
here
https://github.com/prathmeshranaut/skooterapi/blob/master/app/controllers/user_controller.rb#L5
Started POST "/api/v1/user" for 176.54.87.35 at 2017-04-09 02:40:54 -0400
Processing by UserController#create_user as HTML
Parameters: {"phone"=>"2bfcc3088526737b", "android_version"=>"22", "device_info"=>"htc HTC Desire 830", "user"=>{}}
Unpermitted parameters: phone, android_version, device_info, user
User Load (0.2ms) SELECT "users".* FROM "users" LIMIT 1
(0.0ms) BEGIN
(0.0ms) ROLLBACK
(0.0ms) BEGIN
(0.0ms) ROLLBACK
Completed 501 Not Implemented in 3ms (Views: 0.1ms | ActiveRecord: 0.3ms)
@prathmeshranaut I cannot cross the login screen again.
Could you check my server. @prathmeshranaut
Login information 5.39.5.63 login username: root password: Siber999
postgresql password: edirnekesan1996
Could you tell me where have you stored this API and how do you turn on the rails server?
On Apr 9, 2017, at 12:16 PM, byzatwuer notifications@github.com wrote:
Could you check my server.
Login information 5.39.5.63 login username: root password: Siber999
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .
@prathmeshranaut
root folder in skooterapi file
Via ubuntu, I installed ruby on rails directly and imported the skooterapi file to the server with git clone. PostgreSQL and phppgadmin installations Then I did the readme.md file on your process. And I ran the rails.
Ruby on rails new there is something else i need to do ?
Are you going to help ? @prathmeshranaut
I am actually looking into the server and code.
On Apr 9, 2017, at 1:29 PM, byzatwuer notifications@github.com wrote:
Are you going to help ? @prathmeshranaut
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .
I was doing some processing on the server. I left the server to you @prathmeshranaut
The libraries have been updated since we coded this API. I would suggest you to use the code as a starter for creating your own API.
PS: Please change the password of your server.
Ruby on railste I do not know what to do next I can not use this skooterapi I guess. @prathmeshranaut
Ruby on railste new @prathmeshranaut
You cant
On Apr 9, 2017, at 1:52 PM, byzatwuer notifications@github.com wrote:
Ruby on railste new @prathmeshranaut
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I did not understand @prathmeshranaut
You can use this code to build an API in a language you understand.
On Apr 9, 2017, at 1:54 PM, Aayush Ranaut aayush.ranaut@gmail.com wrote:
You cant
On Apr 9, 2017, at 1:52 PM, byzatwuer notifications@github.com wrote:
Ruby on railste new @prathmeshranaut
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
It is not api anyway ? @prathmeshranaut
No, it's broken now.
On Apr 9, 2017, at 1:59 PM, byzatwuer notifications@github.com wrote:
It is not api anyway ? @prathmeshranaut
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I will write the api with php. Do I need to change the content of the SkooterApp? @prathmeshranaut Or do you need to compile the json codes that ı m wrote in php?
I will write the api with php. Do I need to change the content of the SkooterApp? @prathmeshranaut Or do you need to compile the json codes that ı m wrote in php? @prathmeshranaut
No, SkooterApp is modular, just modify the API URL. That would be it.
On Apr 9, 2017, at 3:40 PM, byzatwuer notifications@github.com wrote:
I will write the api with php. Do I need to change the content of the SkooterApp? @prathmeshranaut Or do you need to compile the json codes that ı m wrote in php? @prathmeshranaut
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
hello @prathmeshranaut
I can not bypass the opening screen. That's what happens with skooterapi. Why can not I open the opening screen pass.
I will go nuts please help me @prathmeshranaut please.