fog-aws | Module for the 'fog ' gem to support Amazon Web Services | Authentication library
kandi X-RAY | fog-aws Summary
kandi X-RAY | fog-aws Summary
Module for the 'fog' gem to support Amazon Web Services
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fog-aws
fog-aws Key Features
fog-aws Examples and Code Snippets
Community Discussions
Trending Discussions on fog-aws
QUESTION
does anyone know why the error
"ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/pg-1.2.3-x64-mingw32/lib/2.7/pg_ext.so"
appears while trying to install pg gem in Windows 10?
I tried running gem install pg with admin privileges in command prompt in my application folder, but it throws this error.. I also checked out site https://rubygems.org/gems/pg and there copied how to install pg via command line, and what to include in Gemfile.
Here is my gem file:
ANSWER
Answered 2021-Jun-01 at 01:05I'm assuming you've downloaded and installed PostgreSQL on your system. Use the following to point the gem to where postgres is installed. This is an example of what it'd look like on my system.
QUESTION
I have a blog that uploads banner and thumbnail images. I originally had it set to upload to the local directory using the carrierwave gem and I wanted to try to use digitalocean spaces since the app is deployed to the digitalocean app platform. I am able to get it working on localhost:3000 but when I deploy it to digitalocean it keeps reverting back to a previous deployment saying that a health check failed but not real errors.
I decided to deploy it to heroku since I am able to get actual errors. Here is the current error I get from heroku:
...ANSWER
Answered 2021-Mar-12 at 18:45It seems like the server can't access to the content of the credentials.yml. This file is encrypted and Rails use the master key store in the master.key file to read it. So given that the master.key is not checked into version control, you need to provide it manually on the server. Please check this article https://medium.com/cedarcode/rails-5-2-credentials-9b3324851336
This section :
Deploying master key
When you move your code to a server, you need to make sure that your config/credentials.yml.enc file can be decrypted. That means that somehow you’ll need to provide Rails with your master key, given that it is not checked into version control.
There are two ways of doing that:
Option 1: Place the config/master.key file in the server. You’ll normally want to symlink this file to a shared folder in the server filesystem. Again, do not version your config/master.key file.
Option 2: create a RAILS_MASTER_KEY ENV variable. Rails will detect it and use it as your master key, e.g. in heroku: heroku config:set RAILS_MASTER_KEY=.
You should be able to use any of those indistinctly.
If you are using RBENV as you ruby manager, you can store your env var doing this :
You will create .rbenv-vars
in your project folder, not your rails project folder but the folder in which is your project folder, the parent folder if you want.
After that you put your env var inside the file like this:
DATABASE_PWD=*****
no quotes, no space too before ou after the "="
For more check this link on goRails : https://gorails.com/deploy/ubuntu/18.04#capistrano
Hope this can help
QUESTION
I updated my ruby to 3.0.0 but for some reason now my application doesn't work. I have searched online for different answered but I cannot find anything. This error has gotten me going crazy now. Here is what happens.
When I do bundle update I get:
...ANSWER
Answered 2021-Feb-14 at 10:52Currently Ruby 3.0 is not supported with Rails, as there will be next release for Rails. You can do following and it works by installing dev branch of ruby 3. I used ruby 3.1.0dev (2021-02-14T05:09:08Z master ff527e7e32) [x86_64-darwin19]
Following commands are with RVM you can use same with other softwares I tried by installing
QUESTION
I have a problem with uploading the images from local as env=production or in heroku. I have spent two days to find a solution, but I couldn't find any.
When I want to add an image locally in production mode, it's appearing in the public folder but cannot use it.
I am uploading images via 'carrierwave' gem. I have downloaded 'figaro' and 'fog-aws' as well. Except uploading an image for user avatar from local, everything is working perfectly. You can check the application that I am trying to complete from here: https://young-atoll-50498.herokuapp.com/?locale=en *you should sign up first for trying to upload image.
Here is my AvatarUploader:
...ANSWER
Answered 2020-Nov-17 at 19:41I have found the problem and would like to write down the solution for who might have the same problem in the future...
I was following instructions of the following article because my course recommended that one: https://blog.thefirehoseproject.com/posts/switching-carrierwave-to-use-s3-with-heroku-and-localhost/
*but this is quite old one!
I was getting the error about connecting to S3server. While arranging the 'Permissions, while creating a user for Amazon IAM Dashboard, you should make three first 'off' and last one 'on'. So, you can upload images.
Block all public access -> Off
- Block public access to buckets and objects granted through new access control lists (ACLs): Off
- Block public access to buckets and objects granted through any access control lists (ACLs): Off
- Block public access to buckets and objects granted through new public bucket or access point policies: Off
- Block public and cross-account access to buckets and objects through any public bucket or access point policies: On
Happy coding!
QUESTION
I am getting an error trying to run Spree 3.3 after following the steps to upgrade from 3.2 at https://guides.spreecommerce.org/developer/upgrades/three-dot-two-to-three-dot-three.html.
I updated the Gemfile, ran bundle update
, and then installed the migrations. I couldn't even run the migrations because of this same error:
ANSWER
Answered 2020-Aug-11 at 16:47For anyone else bumping into this, the multi_fetch_fragments
gem has been merged into rails 5
itself and so the line
QUESTION
I am having difficulties to run rails server
command because of the following error:
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add
gem 'sqlite3'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
I found couple answers in Google (Changing Sqlite3 to Postgresql Rails, Ruby on Rails - “Add 'gem sqlite3'' to your Gemfile”, Add ‘gem sqlite3” to your Gemfile...) but none of these answers work for me. I tried to manually change gemfile.lock
values, tried to run bundle
commands but still getting the same error. Moreover, I do have sqlite3
in my gemfile
under :development, :test
group.
- Operation system:
macOS Mojave Version 10.14.4 Beta
sqlite3
version: 1.4.0pg
version: 0.20
PS: I am using pg
gem in order to use database on heroku.
Here is my gemfile
, please note, some of the gems
were deleted to make the list look smaller and cleaner:
ANSWER
Answered 2020-May-11 at 09:32Got it working by updating gemfile.lock
Changed sqlite3 (1.4.0)
to sqlite3 (1.3.13)
.
Update:
Don't forget to specify your gem version in gemfile
.
Example: gem 'sqlite3', '~> 1.3.13'
, otherwise bundle update
command will return an error.
QUESTION
We work on rails upgrade from rails 4.1 to 5.2. We face an issue in aws s3 bucket with x-amz-server-side-encryption policy not allowing rails5 to upload images but allows in rails4
s3 bucket has prevent-uploads-of-unencrypted-objects-to-amazon-s3 policy
Error:
Excon::Error::Forbidden (Expected(200) <=> Actual(403 Forbidden)
AccessDenied
rails4 gems
fog (1.28.0)
fog-aws (0.1.1)
rails5 gems
fog (2.2.0)
fog-aws (3.5.2)
Any suggestion ?? what i'am missing here??
...ANSWER
Answered 2020-Mar-03 at 10:52Solution 1:
With gem carrierwave-2.0.2
adding config.cache_storage = :file to config/initializers/s3.rb
Solution 2:
Fixed it by downgrade gem from carrierwave-2.0.2 to carrierwave-1.3.1
note:
a. storage with :fog and cache_storage is not configured(but default cache_storage :fog) does not work
b. storage with :fog and cache_storage :file works
QUESTION
I have upgraded a Rails 5 app to Rails 6 and also migrated all JS files from the assets pipeline to Webpacker. In development everything works fine. However, when I push the code to production I get an error when I attempt a page load.
I am using heroku for production. The build process successfully completes.
Here is my error:
...ANSWER
Answered 2019-Oct-29 at 10:43Your issue looks similar to issue #2071. In your webpacker.yml
, under production add
QUESTION
Ever since creating a different rails project I have been getting this mysql requirement error on every project that I have.
I have tried installing 'mysql' and 'mysql2' (even though I'm using postgres) gem with bundler. I have tried different ruby versions, different rails versions, different bootsnap versions, I switched from rvm to rbenv. None of my rails projects are able to run.
The bootsnap error appears with the following. /lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require': Could not load the 'mysql' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile. (LoadError)
This is the full traceback
...ANSWER
Answered 2019-Sep-12 at 17:20Try to update ruby version and in the Gemefile add "gem 'mysql2', require: false"
P.S. If problem still persists try to update bundler and than do bundle install
QUESTION
I am working through the Ruby on Rails Tutorial (Rails5) by Michael Hartl in the AWS Cloud9 environment. I'm finishing chapter 11 now. (new to programming as well)
It appears I have broken something related to the Rails (or Ruby) system. I am no longer able to start the Rails server, test or console.
The error message I get usually starts with this, which I have not had any luck finding much information on here or via Google. ovirt-engine-sdk -v '4.2.3'
...ANSWER
Answered 2018-Apr-09 at 13:04So I was able to fix this by:
Installing libcurl developer version:
sudo yum install libcurl libcurl-devel
Once that was complete I ran bundle update which now made it further in the install - to fail at this point Installing pg 0.20.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
Running
sudo yum install postgresql-devel
resolved the pg 0.20.0 issue and I am now able to complete the bundle update and rails seems to be working again.Rails server had an issue booting after all of this. This command got it working again:
bin/rails db:migrate RAILS_ENV=development
After that the environment and rails all seems to be working fine again.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fog-aws
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page