220 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
234
views
Cannot install the gem sqlite3 version 1.4.2 on Mac
I've been having problems getting sqlite3 version 1.4.2 to install on mac. I have a legacy http server application which I am trying to install the dependancies for, but bundle install keeps hanging ...
2
votes
1
answer
389
views
Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (VERSION GEM) already activated sqlite3-Version
I'm trying to upload a localhost server with my application's rails, but I'm having this problem with my sqlite3 gem
Infos
Ruby version: 3.2.0
Rails version: 7.1.3.4
SqliteGem: 2.0
Version show in Gem ...
1
vote
1
answer
170
views
How to load an SQLite Binary data dump into an in-memory read-only database instance?
I have an SQLite binary dump of around 10mb. The dumped database contains some catalogue data, which I need to be able to read from really fast from a Ruby application (sub-millisecond). Therefore I ...
0
votes
1
answer
58
views
SQLite3 and Rack Basic Auth cannot use username as execution parameter
Consider the following code snippet:
require "sqlite3"
db = SQLite3::Database.new "my.db"
p db.execute("select * from user where name = ?", ["my_user_name"])
...
1
vote
1
answer
273
views
Can't delete User due to SQLite3::ConstraintException: FOREIGN KEY constraint failed (ActiveRecord::InvalidForeignKey) error
I'm a beginner working on a Ruby on Rails application where I want to ensure that deleting a user also deletes their associated messages, participants, and rooms. I have set up associations, but I am ...
0
votes
1
answer
67
views
I want to sort data into descending order in rails app and I used sqlite3 database. So is there any order_by available in rails
/home/dell/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activerecord-7.0.8/lib/active_record/dynamic_matchers.rb:22:in method_missing': undefined method order_by' for User:Class (NoMethodError)
Did ...
0
votes
0
answers
137
views
Inserted records are disappearing shortly after insertion
I'm seeing some odd behaviour when inserting records to a table of a sqlite DB in a Ruby application.
I have an application that fetches data from a series of API's, manipulates it and stitches it ...
1
vote
0
answers
165
views
PG::DatatypeMismatch: ERROR: column "name_id" cannot be cast automatically to type integer HINT: You might need to specify "USING name_id::integer"
I experienced this error when I tried to run rake db:migrate.
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::DatatypeMismatch: ERROR: column "...
0
votes
3
answers
128
views
Find and sort all the data(dates) after a certain date by month/day and not year in SQLite
I wanna order the data in an sqlite3 database by date. (Day and Month to be precise)
I have a table,
the data in the table are in the format YYYY-MM-DD
2003年02月20日, 2005年07月16日, 2008年11月18日, 1998年01月02日, ...
0
votes
0
answers
30
views
Rails add multiple columns after a specific column using sqlite3 [duplicate]
I've generated Devise for User and now I want to add multiple columns after the email column:
class AddColumnsToUser < ActiveRecord::Migration[7.0]
def change
add_column :users, :name, :...
2
votes
1
answer
4k
views
How to download and run sqlite3 on windows ? I need to use it with ruby on rails
Im trying to install Ruby on Rails on my Windows 10 PC.
for this is also want sqlite3
So I downloaded a precompiled binary for Windows, from https://www.sqlite.org/download.html
The downloaded zip ...
0
votes
1
answer
78
views
App doesnt run rake commands when deployed to heroku
in my development are the app works fine but when i deploy to heroku and try to run rake db:migrate to build the database, it aborts and says wrong number of arguments. i have searched all over the ...
0
votes
0
answers
105
views
StatementInvalid: SQLite3::BusyException: database is locked
I have referred various answers on StackOverflow but I still haven't been able to resolve this issue. I am sharing the code for my controllers_test.rb and along with that the screenshot. Every time I ...
0
votes
1
answer
379
views
Why postgres is not used in development?
I have encountered this in my Gemfile while learning ruby on rails:
group :development, :test do
gem 'sqlite3', '~> 1.4'
group :production do
gem 'pg'
So far I have understood that sqlite3 is ...
1
vote
1
answer
2k
views
sqlite3 ruby-gem causes undefined symbol rb_check_safe_obj on execution
I am leveraging sqlite3 and active-record. On my local machine everything works as expected. However, when attempting to read from the database on a new debian deployment i get the following error :
...