Initial rom setup


#1

I’m guessing it’s something simple, but I have this error when trying to use ROM in my sinatra application:

undefined methodsetup’ for ROM:Module (NoMethodError)`

This is all from using the basic one-liner provided in the docs:

ROM.setup(:sql, 'sqlite:///path/to/db.sqlite')

using ruby 2.2.1p85 and the following gems:

  • abstract_type (0.0.7)
  • adamantium (0.2.0)
  • anima (0.3.0)
  • backports (3.6.7)
  • bundler (1.8.4)
  • coderay (1.1.0)
  • diff-lcs (1.2.5)
  • domain_name (0.5.25)
  • dry-equalizer (0.2.0)
  • equalizer (0.0.11)
  • http-cookie (1.0.2)
  • ice_nine (0.11.1)
  • json (1.8.3)
  • mechanize (2.7.4)
  • memoizable (0.4.2)
  • method_source (0.8.2)
  • mime-types (2.99)
  • mini_portile2 (2.0.0)
  • multi_json (1.11.2)
  • net-http-digest_auth (1.4)
  • net-http-persistent (2.9.4)
  • nokogiri (1.6.7.1)
  • ntlm-http (0.1.1)
  • pry (0.10.3)
  • pry-remote (0.1.8)
  • rack (1.6.4)
  • rack-protection (1.5.3)
  • rack-test (0.6.3)
  • rom (1.0.0)
  • rom-mapper (0.3.0)
  • rom-repository (0.2.0)
  • rom-sql (0.7.0)
  • rom-support (1.0.0)
  • rspec (3.4.0)
  • rspec-core (3.4.1)
  • rspec-expectations (3.4.0)
  • rspec-mocks (3.4.0)
  • rspec-support (3.4.1)
  • sequel (4.30.0)
  • shotgun (0.9.1)
  • sinatra (1.4.6)
  • sinatra-contrib (1.4.6)
  • slop (3.6.0)
  • sqlite3 (1.3.11)
  • thread_safe (0.3.5)
  • tilt (2.0.2)
  • transproc (0.4.0)
  • unf (0.1.4)
  • unf_ext (0.0.7.1)
  • webrobots (0.1.2)
  • wisper (1.6.1)

#2

The setup was changed in 1.0.0. Please take a look at the announcement post for the first 1.0 beta where it’s explained.

Updated docs will be published later this week on rom-rb.org.