firebase-ruby icon indicating copy to clipboard operation
firebase-ruby copied to clipboard

NameError (uninitialized constant ChatsController::Firebase)

Open Rico-Qbit opened this issue 2 years ago • 0 comments

Hello, I'm just learn ruby and want to try integrate firebase with my api using this package. When I tried to make a post request to my create api, I got this error message: `NameError (uninitialized constant ChatsController::Firebase

            firebase = Firebase::Client.new(base_uri)
                       ^^^^^^^^):`

Looks like something is wrong with the package maybe? Here is my api code looks like : def create base_uri = <my firebase url> firebase = Firebase::Client.new(base_uri) response = firebase.push("messages", { :message_text => params[:message_text], :time => Firebase::ServerValue::TIMESTAMP, :username => params[:username] }) end

Rico-Qbit avatar Feb 06 '23 11:02 Rico-Qbit