@net_deamon wrote:
I did go through the suggesstions in following posts
So I tried 2 ways
Specifying in plugin.rb file
My plugin depends upon “mini_magick” for image resizing, so I specified it in plugin.rb
gem ‘mini_magick’, ‘~> 4.8’
But I get the following error
I, [2017-07-09T03:54:49.899941 #13] INFO – : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake db:migrate
ERROR: While executing gem … (Gem::Requirement::BadRequirementError)
Illformed requirement ["/root"]
I, [2017-07-09T03:54:54.692893 #13] INFO – :/root
is not writable.
Bundler will use `/tmp/bundler/home/discourse’ as your home directory temporarily.
gem install mini_magick -v ~> 4.8 -i /var/www/discourse/plugins/discussbook-plugin/gems/2.4.1 --no-document --ignore-dependencies
You are specifying the gem mini_magick in /var/www/discourse/plugins/discussbook-plugin/plugin.rb, however it does not exist!Specifying in yml file
As it was not working, I tried to add the gem install command in yml file custom commands
- exec: gem install mini_magick -v 4.8.0
I get the following log(success) when it was being rebuilt
I, [2017-07-08T18:50:43.302333 #13] INFO – : Beginning of custom commands
I, [2017-07-08T18:50:43.302751 #13] INFO – : > gem install mini_magick -v 4.8.0
I, [2017-07-08T18:50:44.034391 #13] INFO – : Successfully installed mini_magick-4.8.0
1 gem installedBut when I try to require it in the route, I got the following error in error log
NameError (uninitialized constant) DiscussBook::DiscussbookController::MiniMagick)
Both of these trials did not work, can you please help me regarding what might be the error?
Posts: 1
Participants: 1