Rails 5.2 credentials throwing error - credentials

I am using Rails 5.2.0 and Ruby 2.5.1p57.
I have introduced Rails ActiveStorage to my Rails application. I am able to upload/download file to/from S3 if I use AWS key-secret directly.
When I am running below command
EDITOR="subl --wait" rails credentials:edit
1: from /home/nishant/.rvm/gems/ruby-2.5.1#creative_automation/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:157:in decrypt_and_verify'
/home/nishant/.rvm/gems/ruby-2.5.1#creative_automation/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:190:in_decrypt': ActiveSupport::MessageEncryptor::InvalidMessage (ActiveSupport::MessageEncryptor::InvalidMessage)
This is not my ubuntu system or gemset specific issue as I tried the same thing on other machine but still it is not working.
Thanks in advance.

Related

NodeJS not recognized under Windows 10

I am using the LTS version of NodeJS. The problem started with version node-v16.18.0-x64 and did continue with node-v18.12.0-x64.
What I am doing:
Developing Playwright test. I ran the test and NodeJS was working. After one minute, I rerun the test and NodeJS is no longer recognized in my OS.
The issue appears when I am using Cypress, so I think the issue is not related to the technology that I am using.
I checked the environment variable: It is there.
The workaround I am doing is to uninstall the NodeJS from the control panel and install it again. There is an option to repair the NodeJS installation. But when I try to use it, I receive an error message that the NodeJS is not installed on this OS.

How to bundle a python server with pyinstaller for AppStore as 64bit only?

Context:
I am trying to put an electron app on the App Store. The app features a web frontend and a python backend. Nothing fancy so far.
The backend however features a separate server written in python. This server is a standalone application.
The electron app bundles the main app together with the python standalone server.
The problem:
When building the server as an executable I use pyinstaller on a python 3.5 development environment. Upon uploading to the AppStore I receive the following error:
1 package(s) were not uploaded because they had problems:
/var/folders/39/3v0phzy173s3qxkbxzvcpd5c0000gn/T/82AB662A-44C8-41E9-A213-8BF672F3DF10/1443777291.itmsp - Error Messages:
ERROR ITMS-90240: "Unsupported Architectures. Your executable contained the following disallowed architectures: '[i386 (in com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/AppKit._AppKit.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/AppKit._inlines.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/CoreFoundation._CoreFoundation.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/CoreFoundation._inlines.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/Foundation._Foundation.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/Foundation._inlines.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/PIL._imaging.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/PIL._imagingtk.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/PIL._webp.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libjpeg.9.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libopenjp2.2.1.0.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libtiff.5.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libwebp.7.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libwebpdemux.2.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libwebpmux.3.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libz.1.2.11.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/objc._objc.so)]'. New apps submitted to the Mac App Store must support 64-bit starting January 2018, and Mac app updates and existing apps must support 64-bit starting June 2018."
We tried building the server using this:
pyinstaller server.spec --distpath ../app/app --noconfirm
It didn't work.
Another incantation I use to bundle the python server trying to force 64bit is:
arch -64 python ~/anaconda3/envs/shape/bin/pyinstaller server.spec -s --osx-bundle-identifier com.ShapeRobotics.FableMac --distpath ../app/app --noconfirm"
Why I'm sure it's the server:
I was successful in signing the app and getting it uploaded to the AppStore w/o the server packed in.
After packing in the server the 'i386' architecture error popped up.
Consequently my efforts so far have been focused to eliminate any shred of 32bit code in the server.
I assume that in order to do this I must properly configure the .spec file used by pyInstaller.
Does this make sense?
Is there a way to configure the spec file to force exclusive 64bit on anything bundled inside?
Is there some clear cut way to make the AppStore upload not vomit the 'i386' error?
Thank you!

Rails not detecting Node.JS

Im having an issue while trying to solving another one.
Im developping a Rails app on Windows 10, I run into the JavaScript issue that avoid Rails from working, a lot of people solve this issue by Installing Note.JS, some others change UTF-16LE to UTF-8 on routines.rb on ExecJS gem.
None of those solve my issue so I decide to force Rails using Node.JS instead of Windows default JScript by installing Node.JS (I tried with both x64 and x86 versions) and adding
ENV['EXECJS_RUNTIME'] = 'Node'
to my boot.rb ... this drive my into my second error by showing this message on rails server loading process:
There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Node.js (V8) runtime is not available on this system
I really appretiate your help! Im driving with those error for a while now and I feel kind of stuck now.

Setting up Nodejs 5.10.1 on Openshift

I run a Discord bot. I am using Nodejs on Openshift. I was using their latest cartridge until I realized NodeJS 6.3 has an out of bounds bug.
I have been trying to use an earlier version of Nodejs (like 5.10.1), but I don't know how to set up the application in their cartridge. Does anyone know how to go through the setup process?
According to openshift cartridge nodejs readme, you have to set environment variables NODE_VERSION_URL & NPM_VERSION_URL if you want custom version of node/npm :
NODE_VERSION_URL=https://semver.io/node/resolve/4.3.2
NPM_VERSION_URL=https://semver.io/npm/resolve/3.6.0

Can we install a ROR web app developed in Windows platform to Linux machine?

We have developed a Ruby on Rails application in Windows 7. Now we want to try installing it on a Linux machine and see if it can work.
What all points should I consider here?
Can we directly deploy the code in Linux? and Should i consider some gems being specific to windows?( I remember using win32ole gem for interacting with excels) Linux is completely new to me. Any help is appreciated.
Ruby version - 1.9.3p327
Rails - 3.2.9
Database - MySQL

Resources