sinatra-activerecord

Derived Activerecord Ruby Class

别说谁变了你拦得住时间么 提交于 2019-12-13 06:13:24
问题 I am totally new to ruby. I am trying to make a RESTful service for task tracking application. I researched and found Sinatra better for the job than rails. So I am using Sinatra and ActiveRecord. I am following Up and Running With Sinatra and ActiveRecord. I will be creating the client application in .NET using Restsharp. But this is all about server side. This is the migration I have created class CreateTasksPeopleDocumentsAndComments < ActiveRecord::Migration def self.up create_table

Sinatra - ActiveRecord::ConnectionNotEstablished: No connection pool for ActiveRecord::Base

六眼飞鱼酱① 提交于 2019-12-11 01:20:43
问题 I've only been able to find rails answers to this question. Whenever I run rake db:migrate I am getting the aforementioned error. As far as I am aware, I have setup everything correctly so have no idea what's wrong. config/environment.rb ENV['SINATRA_ENV'] ||= "development" require 'bundler/setup' Bundler.require(:default, ENV['SINATRA_ENV']) configure :develpoment do set :database, 'sqlite3:db/database.db' end require './app' Rakefile require "./config/environment" require "sinatra