aws s3 ruby aws-sdk file transer using pivotal cloud foundry - ruby-on-rails

Help: How do you transfer a PDF File from S3 to a local desktop file directory when the rails app is deployed in Pivotal Cloud Foundry?
Using ruby and the aws-sdk to download a PDF File from S3 to local client machine directory.
get_object(bucket: #s3_bucket, key: file_name, response_target: "#{Rails.root}/Downloads/#{file_name}")
The above ruby code works. The file appears inside the Download Directory on the Mac.
Problem: deploying the rails app into Pivotal Clown Foundry breaks the placement of the PDF File and where it gets stored. It seems as if get_object returns the PDF to the Cloud Foundry Container in directory in "/home/vcap/app" rather than getting pulled down to the user's remote computer file directory. But that's not available to the person to open up the file.

Pivotal Cloud Foundry will not download any files onto your local work machine by default.
When code is run on Pivotal Cloud Foundry the code only has access to the filesystem in the app instance (container).
If you wish to retrieve a file from a app instance you may SCP it from the Application Instance. Here are the docs on how to do that

Related

Docker: User upload image

I have a local web app running with docker (php, apache and mySQL) and all is fine on local environment. I deployed to Digital Ocean, mySQL is running and html is ok as well EXCEPT show user uploaded image files.
I have a Admin system, where the user can upload product images, the files are being save in the "asset" folder. There's isn't any error on chrome dev tools and no errors on Digital Ocean logs too. The files is being uploaded, but I can't access them to show to my user!
How to do it?
Best

How to add a file into the project just before deploying the code into Heroku server

A requirement where I need to aad files (Like .txt or .eml) from S3 into the project just before deploying the code into the Heroku server. I can do this on my local machine by creating a commit but in this case, that file will be downloaded into my local machine.
We don't want to download the file into my local machine just wanted to add that file into the project that it can de available during the deployment.
So someone guides me that How to download content from S3 and include it to build slug or package during deployment.
Any help will be highly appreciated.
Thanks
It's a little bit of work, but you could look into implementing your own buildpack for this app. Heroku supports multiple buildpacks that are executed (in order) on your app when your app is built as part of the deploy process, see https://devcenter.heroku.com/articles/buildpacks#creating-a-buildpack for more details. After running the language builpack, your buildpack could download the file, which will then be available to your Dynos when the app has finished building and is being run.

How can I run a Jekyll powered website from HostGator?

I want to create a website with 'dynamic' pages for a web app. I 'cant' use Node because HostGator charges more for a dedicated server (required for Node apparently). Looking for a solution such as Jekyll or RoR. Does anyone know how to spin up a simple webApp powered by these on an environment like HostGator?
Thanks in advance.
Just build your Jekyll site locally and upload the _site/ directory into your website folder on your shared HostGator folder. You could also use a git repo and push all the files from Jekyll's _site directory to master and then pull them down via ssh on your HostGator website folder. Or create a git hook or other automated way of updating the files.
Should be as easy as uploading a static html site, since that is what Jekyll is.
If you are looking to build a Rails site check out the HostGator guide here http://support.hostgator.com/articles/specialized-help/technical/how-do-i-start-using-ruby-on-rails

xe6 - auto deploy output to AWS S3 using REST

OK, new to rad studio, and enjoying it.
We have a cross=platform product, and would like to configure XE6 to automatically deploy to compiled .exe & Dll files to specified buckets in S3.
We have looked at the cloud exploerer example which came with samples and can load the files manually using REST.
http://docwiki.embarcadero.com/CodeExamples/XE6/en/DataSnap.Cloud_Explorer_Sample
and have checked out how to specify an output folder
Where can I specify an output folder for DLLs?
As discussed we are not that familiar with XE6, and while they have something called a 'platform deployment manager' we don't want to setup up and EC2 instance to facilitate the process.
Does anyone have any sample scripts or advice on how to configure the output path to use the REST protocol to put the compiled files up on S3 automatically?

Grails application in openshift

I am trying to deploy my grails application on an openshift server. I have created an instance using command "rhc app create MyApp jbossews-2.0". When I ssh to the server, I see a jboss folder but no tomcat folder. How can I deploy my .war file onto the server?
I think the Docs on how to deploy a binary file will help you with this, however what the docs do not say is that with Tomcat the deployments directory is called webapps but they work the same way (except for the marker files, tomcat does not use those).
You may want to check out https://github.com/gssOpenShiftsupportExamples/JavaSample as it shows an example of how to do this with JBoss (the same thing will work for Tomcat if you change the directory as denoted above).

Resources