Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError (uninitialized constant ChatsController::Firebase) #102

Open
Rico-Qbit opened this issue Feb 6, 2023 · 0 comments
Open

NameError (uninitialized constant ChatsController::Firebase) #102

Rico-Qbit opened this issue Feb 6, 2023 · 0 comments

Comments

@Rico-Qbit
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant