ActiveRecord-without-Rails | ActiveRecord CRUD tasks using Ruby | Job Scheduling library
kandi X-RAY | ActiveRecord-without-Rails Summary
kandi X-RAY | ActiveRecord-without-Rails Summary
ActiveRecord CRUD tasks using Ruby (without Rails)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ActiveRecord-without-Rails
ActiveRecord-without-Rails Key Features
ActiveRecord-without-Rails Examples and Code Snippets
Community Discussions
Trending Discussions on ActiveRecord-without-Rails
QUESTION
For a new project I thought, why not skip rails and do more myself. Sadly I fail at a really simple problem.
I found out already that I need to use ActiveRecord::Base.connection.create_database('backend')
after I set the connection with ActiveRecord::Base.establish_connection
to create the database.
Sadly the error I get is really annoying since it tells me it can not create the database, because it does not exist: ActiveRecord::NoDatabaseError (Unknown database 'backend')
.
I use docker-compose to host the code and database, hostname/username/password are all correct.
It is har to use google since all code examples use rails and tell you to call rake db:create
witch I obviously try to create myself while I had this error.
ANSWER
Answered 2020-Apr-12 at 12:34It seems you are using MySql. ActiveRecord alone will not able to perform the operations. You need an RDMS ruby client as well to communicate. I think using mysql2 gem additionally should resolve the issue.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ActiveRecord-without-Rails
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page