Bundle only supports platforms x64-mingw32 but local is x86_64-linux - deployment

I developed my Rails Application in a Windows environment and I am trying to deploy into Linux Ubuntu 16.04. I am stumbling upon this error:
Your bundle only supports platforms ["x64-mingw32"] but your local
platforms are ["ruby", "x86_64-linux"] and there's no compatible match
between those two lists.
I think the problem is with gemfile.lock . in addition to seeing strings with 'x64-mingw32' for each gem; I find that there is also this:
PLATFORMS
x64-mingw32
How do I make my application run in a Linux 16.04 LTS Environment?

Your Gemfile.lock is restricting the platform your app can run on.
Deploying the app into Linux without the .lock file should resolve your issue.
If you have any Windows-specific gems in your Gemfile, its better to move them to a dedicated block:
# Gemfile
platform :mswin, :mingw, :x64_mingw do
gem "tzinfo-data"
gem "win32_api"
end

Capistrano requires the Gemfile.lock file for deployment. Bundler is the one that is causing this but according to their Github it is intented behaviour to make your app compatible with different platforms.
In order for this to work - as of 1.13, you could run bundle lock --add-platform ruby on Windows to add the ruby platform to your lockfile ahead of time.
Github Issue

Related

How to run VSCode on Centos6

My company is using an old CentOS6 and they wont update it before months (years?). This is totally out of my control and it obviously makes using up to date software a nightmare.
I would like to use Visual Studio Code as a C++ IDE but its intellisense plugin is running with glibc >=2.14 and Centos6 comes with glibc 2.12.
It also needed some more dependencies I managed to recompile and load with LD_LIBRARY_PATH. I tried compiling a new glibc and load it as well but it segfault, as expected.
I used the compiled version of VSCode from the official website.
I tried compiling it myself but it requires to download many files and my virtual machine does not have Internet, I can only transfer files through ftp. I created a local yarn repository, compiled all appropriate version of Yarn, NodeJS but a compiled binary is trying to download electron and I have no idea where to put the file to trick him into thinking it's downloaded already (assuming I could).
There are standalone solutions to run software on old distribution, like AppImage but VSCode is not part of their apps.
Would you have any idea on how to run VSCode on Centos6? Did you ever try to compile VSCode without and Internet Connection?
Currently the only viable solution I see would be to create an AppImage at home.
To run VS Code Server on CentOS 6, I followed the "glibc and libstdc ++ on RHEL / CentOS 6 update" article from here.
Perhaps this option will help you.

Reverting to old Google Cloud SDK shell version

I am trying to deploy a Java project into Google App Engine from Eclipse and am blocked by JSPs.
Everything JSP makes my app not capable of deploying due to "'utf8' codec can't decode byte" error.
Not trying to insert any strange (not UTF-8) character, everything Eclipse is set to UTF-8.
Tried to send archives which were OK with the Google App Engine Tools for Eclipse (soon to be deprecated), won't deploy.
I've seen threads regarding reverting the Google Cloud Tools for Eclipse plugin to previous version (1.58 seemed to avoid a few problems) being a possible solution to these recent errors but I have a problem installing, the batch just tells me "Install will exit" ?!
Tried to uninstall previous (latest) versions before, made sure I was launching the bundled-python batch, still not capable of installing an old version of the Google Cloud SDK shell.
Would be glad if anybody had any suggestion at what makes my install fail.
Thanks in advance.
There are a few ways you can get older version of Google Cloud SDK.
Download versioned archive
(If you are on windows) Grab google-cloud-sdk-XXX.0.0-windows-x86_64-bundled-python.zip file.
Unzip it to some\dir
Add some\dir\google-cloud-sdk\bin directory to your system path
Restart your command prompt (or other apps which depend on gcloud) and run for example gcloud info, it should be fully functional installation, no need to run install.bat.
Alternatively, use existing SDK installation and gcloud component manager to go back to previous versions. For example
gcloud components update --version 158.0.0
target by version number using apt-get :
sudo apt-get install google-cloud-sdk=294.0.0-0

Would AIX 7 support Capistrano 3?

Would AIX 7 support Capistrano v3.4.0 (or above) and its dependent scripting tools such as Gem, Ruby, Rake, etc...? and if it does, where could one find a list of supported versions for the dependent scripting tools?
As stated in the Capistrano README, you need Ruby 2.0 or higher. All of Capistrano's gem dependencies are automatically installed when you run gem install capistrano, assuming that your Ruby 2.0 environment is working.
That said, installing Ruby on AIX seems challenging. You may have to compile it from source: Installing Ruby on AIX .
This assumes of course that you want to deploy from AIX (i.e. run the cap command on an AIX machine) as opposed to deploying to AIX (using a Mac, PC, or Linux machine to deploy to an AIX server). If you want to do the latter, you should be fine: Capistrano has no requirements for the server other than sshd.

Install package depending on OS

We have been testing with Platform.sh this weekend, which uses debian as its OS. The deployment of the application was easy, until we started testing some of the core functionalities like creating a PDF.
The PDF is generated using wkhtmltopdf, which has different binaries depending on OS. Our own platform consists of CentOS7 machines, so we let composer install the Centos7 specific package: https://github.com/rvanlaak/wkhtmltopdf-amd64-centos7 For Debian this package is needed: https://github.com/h4cc/wkhtmltopdf-amd64
So basically the problem is the inconsistency in plaform. Saw that composer allows you to define specific versions for PHP and extensions, but config.platform unfortunately can not solve this problem.
Unfortunately the following hooks did resolve into a deployment error too:
composer remove rvanlaak/wkhtmltopdf-amd64-centos7 --no-update
composer require h4cc/wkhtmltopdf-amd64:~0.12 --no-update
composer update
As we can not choose the OS on platform.sh, how can we let composer check for a specific OS?

Rails: moving development environment from windows(mingw32) to OS X mountain lion

I have a rails 3.2.3 application which I was developing on my windows machine using git_bash as cli and mingw32 as environment (installed this env using railsinstaller)and postgres as db.
But there were some problems with rmagick and couldn't use it, although minimagick was working as expected.
Now, I am going to move application to my new mac machine running OS X mountain lion.
I have installed rails 3.2.8 and ruby on OS X using rvm. what do I need to do to update my application to rails 3.2.8 and setup db and other gems, should I delete or not delete gemfile.lock and what gems I need to remove or add or change version no. etc.
I am new to rails, please help
thanks!
Should I install postgres using homebrew or download from http://www.postgresql.org/download/macosx/
which is a preffered way of installing postgres, pros and cons of these methods.
As long as you don't have any Windows/machine-specific code in your app, you'll just need to do bundle install.
Regarding Postgres, it doesn't matter where you get it from, as long as it's on your $PATH. If you're already using Homebrew, then it makes sense to just do brew install postgres.
Gemfile.lock gives A list of gems used to ensure that all copies of the app use the same gem versions.
since I'm the only one working on this app and it's not yet in production. So, for me it makes more sense that I nuke Gemfile.lock and specify updated versions of gems I want now.
Things I did
Copied my application directory from my windows machine after cleaning some data in my tmp/ directory( tmp/ directory had 100M of data).
Installed imagemagick using brew install imagemagick
Installed postgresql using brew install postgresql
Generated a sample app using rails new blog -d postgresql
Changed database.yml file according to postgresql, as it required my mac user to be the username.
run sample blog app, and it was working fine. created a scaffolding and entered data and everything was working.
copied content of Gemfile.lock from blog application and pasted in my application's Gemfile.lock
changed version of rails in my Gemfile from 3.2.3 to latest version 3.2.8. changed version of some other gems.Replaced 'minimagick' with 'rmagick'. (I had problem with installing rmagick gem on windows, minimagick gem somehow worked on windows with older version of imagemagick).
Changed database.yml.
run rake db:create:all to create all the db.
run rake db:migrate
Run bundle and it installed all the dependecies.
run rails s
Everything is working fine now :)