VICTOR-LUO-F / aliyun-sms

a Ruby Gem for using aliyun sms service. 一个应用阿里云短信推送服务的Ruby Gem。
MIT License
69 stars 38 forks source link

Error: uninitialized constant Aliyun (NameError) #1

Closed mvn-khoadao-hn closed 7 years ago

mvn-khoadao-hn commented 7 years ago

Hi there, I used your gem to send Aliyun SMS. But after add gem and config step "在 rails 应用目录 config/initializers/ 下创建脚本文件 aliyun-sms.rb,在文件中加入以下内容" => I got error when try run rails console config/initializers/aliyun_sms.rb:1:in `<top (required)>': uninitialized constant Aliyun (NameError)

Please you help me to resolve it. Thanks you

VICTOR-LUO-F commented 7 years ago

I also met this problem, the reason perhaps is the Ruby-Gems resource error. I resolve this problem by changing the install resource to Github. For example, you can add code following in ./Gemfile

gem 'aliyun-sms', git: 'https://github.com/VICTOR-LUO-F/aliyun-sms.git'

Today, I already add this to readme.md.

mvn-khoadao-hn commented 7 years ago

gem 'aliyun-sms', git: 'https://github.com/VICTOR-LUO-F/aliyun-sms.git'

After i added it to Gemfile, it runs well

Thank you so much

VICTOR-LUO-F commented 7 years ago

:)