cloudinary can't find config items (api_key) - ruby-on-rails

Hi I am using cloudinary in my ROR 5.2 app and it was uploading fine but I had to remove cloudinary gem from my gem file and after removing it I rand bundle install command after that it stopped working and is giving me the following error
ActiveStorage::IntegrityError in Devise::RegistrationsController#create
Must supply api_key
My all other configurations are same and I haven't changed anything and I have also tried installing it again by using command gem install cloudinary but I am getting same error.
Note https://medium.com/nerd-for-tech/getting-started-with-cloudinary-in-ruby-on-rails-6-925888032395
I followed above mentioned tutorial.

Related

Unable to load gems in cloud 9

I cannot load many ruby gems in Cloud 9's ruby on rails.
For example I run
$ gem install signer
and get:
Successfully installed signer-1.4.2
1 gem installed
but then when I try to call it with:
require "signer"
I get the following error upon running:
cannot load such file -- signer
I am getting desperate, any help would be immensely appreciated!
Adding the following line to the Gemfile within your Rails folder:
gem 'signer', '~> 1.4.2'
and then running bundle install should remove the error.

Error while installing rails and starting server

I'm totally new to rails. I downloaded rails package from railsinstaller.org and installed it. While starting server, i got this error
"Could not find uglifier..."
Then i tried bundle install. It is not working.
Then i totally uninstalled it and installed only ruby from rubyinstaller.org. Ruby is working fine. When i tried "gem install rails", i'm getting this error
"could not download data from rubygems.org"
What i tried
1) I downloaded the rails-4.1.7.gem and tried installing it locally as show here
How can I specify a local gem in my Gemfile?
I tried gem "rails", :path => "D:\rails-4.1.7.gem"
Error: Unknown command rails
2) I tried the solution here
gem install rails doesn't work due to openssl/ETimedout in windows
But getting this exception
I cannot able to set it up. Please tell how to install rails and start the server. I'm a total newbie to rails.

why nifty_generators not being recognized?

i have installed nifty_generators successfully. Though, when i run the following command:
rails generate nifty_authentication
i get the error:
Could not find generator nifty_authentication.
I have included gem 'nifty_generators' in my gem file. What is the error?
Couple of things after looking on its github.
First, I believe the gem is call nifty-generators not nifty_generators, which may be causing you some other problems as well.
Second, per the instructions , you should be calling it via rails g nifty:authentication.

Paperclip in Production with Unicorn: uninitialized constant Paperclip (NameError)

I added Paperclip to my app then tried to deploy to my VPS using capistrano. The deploy happens successfully, but when I try to access my app on the VPS, I get the Rails Error Page.
There is no information in production.log, but unicorn.log has the following error:
E, [2013-06-25T19:44:07.372060 #21995] ERROR -- : uninitialized constant Paperclip (NameError)
/home/deployer/apps/arcsite/releases/20130625182331/config/initializers/paperclip.rb:1:in `<top (required)>'
The initializer file is paperclip.rb and has these contents:
Paperclip.interpolates :zone do |attachment, style|
attachment.instance.zone_id
end
It's an interpolater to allow me to use the folder structure I want.
If I remove the paperclip.rb initializer file, I get an error that has_attachment is undefined in my class, making it seem like the paperclip gem isn't being properly loaded.
I tried to uninstall/reinstall the gem, but when I ran gem uninstall paperclip, it told me that the paperclip gem was not installed. When I ran bundle show paperclip it did show a directory (I'm using RVM), so I manually installed the paperclip gem with gem install paperclip. I'm still getting the same error.
This app works fine in development on the thin server.
My VPS setup:
nginx
unicorn
rvm
capistrano
rails version: 3.2.13
paperclip version: 3.4.2
I followed Ryan's screencast to set up nginx/unicorn
Turns out it was some weird installation behavior. Had to work with the RVM people and have updated the rvm capistrano documentation to reflect the new procedures.
So the problem was that unicorn wasn't recognizing my newly installed gems, all I had to do was simply manually stop and then manually start unicorn and everything got taken care of. I had this exact same issue after deploying my app with paperclip installed.
In the application's root directory through SSH--
service unicorn_"app name" stop
followed by
service unicorn_"app name" start

Error while running rails on remote host. "Could not find crack-0.1.8 in any of the sources"

I am trying to deploy my rails app that is working fine on my local machine , to a remote host. I am using railsplayground.com to be exact. When I try to run the app using Passenger,I get this error
"Could not find crack-0.1.8 in any of the sources"
But when I did a,
$gem list
the gem , crack (0.1.8) is present. I am using Rails 3 btw.
Any suggestions is welcome. Thanks in advance.
Make sure the Gem is installed via Bundler. Check your Gemfile and see if the gem is listed.
Then, when deploying the application, make sure to execute the $ bundle install command.
If you deploy the project with capistrano, you can use the default bundler recipe by including the recipe at the top of your deploy.rb file.
require 'bundler/capistrano'

Resources