Skip to content

Commit 17c9094

Browse files
authored
docs: add require info
the gem name does not match the gem class name. Therefore an loading issue can occure. Bundler has an [option to load](https://bundler.io/v2.5/man/gemfile.5.html#REQUIRE-AS) a different class if the gem name differes
1 parent c638f86 commit 17c9094

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Generate png, jpg or webp images with Ruby. Renders exactly like Google Chrome.
1111
Add this line to your application's Gemfile:
1212

1313
```ruby
14-
gem 'htmlcsstoimage-api'
14+
gem 'htmlcsstoimage-api', require: 'htmlcsstoimage'
1515
```
1616

1717
And then execute:
@@ -27,6 +27,7 @@ Or install it yourself as:
2727
Create a new instance of the API client.
2828

2929
```ruby
30+
require "htmlcsstoimage"
3031
# Retrieve your user id and api key from https://htmlcsstoimage.com/dashboard
3132
client = HTMLCSSToImage.new(user_id: "user-id", api_key: "api-key")
3233
```
@@ -36,6 +37,7 @@ client = HTMLCSSToImage.new(user_id: "user-id", api_key: "api-key")
3637
Alternatively, you can set `ENV["HCTI_USER_ID"]` and `ENV["HCTI_API_KEY"]`. These will be loaded automatically.
3738

3839
```ruby
40+
require "htmlcsstoimage"
3941
client = HTMLCSSToImage.new
4042
```
4143

0 commit comments

Comments
 (0)