aneta_bielska [:blog]

Troubleshooting: undefind method to_h for Array
#heroku #ruby

Quick tip. When I finished working on next feature I made sure everything works on localhost. Then I pushed to Heroku where my app …failed. I checked heroku logs. I have found an error which was quite surprising: NoMethodError - undefined method `to_h' for []:Array: Why didn’t I get this error on localhost ? I digged for a moment and I fou... Read more

Troubleshooting: do_postgres gem instalation error
#postgresql #ruby #ubuntu

Not always gems in Gemfile are efficient to make a ruby app work. Sometimes you need more dependencies. When I was installing datamapper dependant gems I got this error: An error occurred while installing do_postgres (0.10.16), and Bundler cannot continue. This error message wasn’t verbose enough so again I had to do some digging. The probl... Read more

Datamapper + Sinatra + PG/Sqlite3
#sinatra #pg #sqlite3

Datamapper is a ruby ORM. In previous article I was writing about alternative to Active Record ORMs. And in this post I will go into more setup details of Datamapper. I picked Datamapper because I wanted to give it a try. Thing I like about DM is that you don’t need to add migrations. All you need are models and a bit of configuration. Add nece... Read more

ORMs Alternative to ActiveRecord
#data-mapper #ROM #sequel #ORM

Ruby on Rails, ActiveRecord an ultimate truth. Now I am using Sinatra with DataMapper. I feel a bit like I am escaping Matrix. Don’t get me wrong. I really like Active Record. AR is a powerful tool and speeds things up. My intention is to dig around and show some alternatives. For instance DataMapper. Datamapper DataMapper is a lightweight and... Read more

ReactJS: simple filtering
#react-js

Filtering is a core feature of my app. Example below is a first step to create it. In visual part it has a select with options and a submit button. It connects to a temporary tiny api with a few example objects. So it is possible to check if it works. // /api/pets.json // a tiny example object [ ... { "id":11, "name":"Nasus", ... Read more

#servers (1) #hosting (1) #sinatra (2) #assets (1) #sprockets (1) #react-js (1) #data-mapper (1) #ROM (1) #sequel (1) #ORM (1) #pg (1) #sqlite3 (1) #postgresql (1) #ruby (4) #ubuntu (1) #heroku (1) #git (1) #css (3) #cors (1) #same-origin-policy (1) #rake (1) #web-scraping (1) #ruby-on-rails (1) #brug (1) #elixir (1) #benchmark (1)