LoadError on github ci workflow running with rails and ruby - ruby-on-rails

I recently upgraded my GitHub CI workflow to use ubuntu-22.04 from previously used ubuntu-18.04 since ubuntu-18.04 would be deprecated this year in December. As soon as I upgraded it, it started failing the setup database on GitHub CI. This is the following error I got on GitHub CI -
LoadError: libffi.so.6: cannot open shared object file: No such file or directory - /home/runner/work/documentor/documentor/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi_c.so
I am using ruby 2.7.5 and rails 6.1.3. I already have the gem ffi installed and inside my Gemfile. How can I resolve it?

Related

Ruby version mismatch while deploying Rails App with AWS CodeDeploy and CodePipeline Scripts on Ubuntu 20.0 EC2

So my Rails Application is running on Ruby2.5.7 and Rails 5.1.5. I have added appspec.yml which include multiple scripts to setup my app like
Setting up ENV variables
Installing Gems
Migrations
Assets Compile etc.
I have also installed rbenv and installed ruby 2.5.7 on instance but every time i trigger deploy the code deploy agent is using ruby 2.7 and trying to install gems on that version which is raising error Your Ruby version is 2.7.0, but your Gemfile specified 2.5.7. My Gemfile specifies 2.5.7 and .ruby-version is also present. I tried to switch the ruby version in myscript but nothing is working. Let me know if anyone needs more information.

Heroku: Deploying Ruby on Rails Rest API mistmatch version between Ruby and Gemfile

these are my first steps using Heroku; I'm trying to deploy a very basic Ruby on Rails Rest API to Heroku, when I run the command: git push heroku main I got this error:
So, using a couple of commands I found the differences:
Checking versions:
Checking the Gemfile:
Using keroku CLI to check Ruby's version:
so it seems there is a problem with the PATH variable, at least it was I read, and definitively the ruby's version are different using the command heroku run "ruby -v"
My question is: how can I solve the ruby mismatch version?
Thanks a lot

Rails 5.2 on Heroku - missing coffee_script

I have been using Rails 5.2 from the 5-2-stable branch of Rails to use ActiveStorage, now I am updating a bunch of apps to use the released version again. As mentioned in this issue the rails versions from Github all requires coffee_script. Now I want to remove coffee.
I cannot recreate this in my local environment or on CI, but when deploying to Heroku it fails with:
LoadError: cannot load such file -- coffee_script
/tmp/build_2b0eaffa6f7fd662e3233ac5b4de6d62/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
I cannot find any mention of coffee in my code.
Could this be a caching issue on Herkou or similar? Any clues are welcome.
Failing gemfile
https://github.com/fsek/voting/blob/50d063d16ae8d323f0cfe57e5bb6b4299c592019/Gemfile
Working gemfile (separate project, can be deployed)
https://github.com/pensionsupplysning/web/blob/cb256668640e38af4b59e8cf23fbfa939728abb7/Gemfile
Add the gem coffee-rails to your project or migrate to sprockets 4.x and make sure you follow this migration guide: https://github.com/rails/sprockets/blob/master/UPGRADING.md#manifestjs

Deploying error with capistrano: "bundler: not executable: cap"

I am supposed to work on a quite antique Ruby On Rails project to make some minor (mostly HTML and CSS) changes on some webpages. I did not work with Ruby On Rails before and I am just getting into it.
I have cloned the project via git from github and installed all gems via 'bundler install'. Note that I am using an old version of Ruby (1.8.7) since I was told the project would not work with a newer version. Note also I am on Windows 7 and the project was built with Mac OS X.
Now I am trying to get the changes I made to the live site (after commiting and pushing the changes to the git repository) with Capistrano (Installed and Version 2.8.0) which should be possible with
bundle exec cap production deploy
However when I try this I just get:
bundler: not executable: cap
Any ideas what is going wrong here? Thanks alot in advance!
Kind regards,
Peter
Generally, capisrano is not defined as a gem in a project's Gemfile. Try installing the gem with gem install capistrano.
You can also check if Capistrano is installed on your system by running cap -T in your project folder. This should give you a list of all tasks in that project.

Redmine plugin install

I just installed redmine via apt-get on Linux Mint 14. Before I added the repository from https://launchpad.net/~ondrej/+archive/redmine. Everything works fine.
Environment:
Redmine version 2.3.1.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.13
Next step would be for me to install a few plugins. I followed the instructions on
http://www.redmine.org/projects/redmine/wiki/Plugins.
The plugin to install http://www.redmine.org/plugins/redmine-projects-accordion
I created a directory /plugins under /usr/share/redmine (this is
where also the app-folder is).
Next step to do a rake redmine:plugins:migrate RAILS_ENV=production.
Now im getting a little Warning: WARNING: 'require 'rake/rdoctask'' is deprecated.
Next step is to restart apache(using passenger-mod) to restart
redmine. But there is no plugin on my administration.
As Im not a ruby/rails dev I can only guess where to search. Any ideas where to look for further information etc? Would be thankful for any advice.
Thanks a lot in advance.
Redmine is a ticket system as well as it is a issue tracker. Some companies are recently using redmine and it is developed by rails frame work. Now Redmine is upgraded its version to 2.x (recently 2.3 is the stable version). So , How can we use plugins in redmine 2.3 versions which we already implemented in redmine 1.x version.
Generally we can easily search the plugins from redmine plugins directory and do install , migration and restart the server i am sure some of you may get some issue at configuration level of the plugin from admin panel. So it depends up on the plugin version too.
You can find the better approach to install the plugins in redmine 2.3 in step by step process is explained in detail from this blog
http://mywayonrails.wordpress.com/2013/07/08/plugins-for-redmine-2-3

Resources