Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Unable to set viewport_width #14

Open
benrudolph opened this issue Feb 18, 2014 · 0 comments
Open

Unable to set viewport_width #14

benrudolph opened this issue Feb 18, 2014 · 0 comments

Comments

@benrudolph
Copy link

First off, great gem. I love it. I've been running into an issue though when setting the viewport in Shrimp's config. My code looks like this:

 Shrimp.configure do |config|
      config.viewport_width = 1080
      config.margin = '0cm'
      config.rendering_time = 3000
 end

And then I get an error:
undefined method 'viewport_width=' for #<Shrimp::Configuration:0x007fda0fb741e8> (NoMethodError)

I pointed to a cloned version of the shrimp gem and got it to work by moving this line to the last line in the hash literal (ie moving the viewport_width and viewport_height above the file opening in initialization). I do note that I'm not using a config.json file, though I have tried and I still get the same error.

Ruby Environment Manager: rbenv
Ruby Version: 2.0.0-p353
Rails Version: 3.2.13

benrudolph added a commit to benrudolph/shrimp that referenced this issue Feb 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant