Can I run rails 4 project using rails 5 - ruby-on-rails-4

I want to upgrade my local gem to rails 5 to create a new rails 5 application. However I have some old rails 4 applications that I don't really want to spend time in upgrading them to rails 5.
will I be able to run these projects if I upgrade to rails 5 ?

Yes. I tried it and found out that it works just fine

Related

upgrading rails 4 to rails 6 - directly or step by step?

I want to upgrade the rails 4 app to rails 6 latest version. To do so, should I upgrade directly from 4 to 6 or have to do step by step ?
First Rails 4 to Rails 5, then 5.0 to 5.2, then 5.2 to 6.0, then 6.0 to latest version ?
Current Rails version - 4.2, Ruby - 2.3.6
And what version is best suitable for Rails 5.0 & Rails 5.2 ?
For Rails 5.0 and 5.2, you could go for Ruby 2.7 or 3.0 version.
If you want to upgrade your rails app from rails 4 to rails 6, then I would suggest you to create a new rails 6 app and migrate all your files. Because in Rails 6 there are a lot of new changes like webpacker, new Javascript file structure etc.

Ionic 2 app takes too much time to load even build with --prod flag

Well, I am new to ionic 2 and build my first app having 2 pages and 2 services which are the very simple and for a news website.
The problem is, first I build my app for android using --release flag the file size was near 4MB and when I deploy on my mobile the load time was 14 - 17 seconds.
Then I search for 2 days to fix this issue and came up with the idea that I should enable production mode in main.ts and build using --prod flag . Now file size is 2.65MB and load time is 8 - 11 seconds which I think too much time for a mobile device. :(
My system information is:
ordova CLI: 6.5.0
Ionic Framework Version: 3.2.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.10.0
Xcode version: Not installed
In my app I simply pulling news from rest server and displaying on my page. Am I doing something wrong or is there any issue with new version of ionic? I also read by some people that ionic 1 speed was good than the latest version.
Note: I run my app on 3 different devices the issue remain the same.
Check your config.xml, and set SplashScreenDelay value to zero
<preference name="SplashScreenDelay" value="0"/>.
For me, below command worked:
ionic cordova build ios --prod --aot --minifyjs --minifycss --optimizejs
You can use your own platform in above command instead of ios.
It decreased app load time in my case.
Please find more details here https://forum.ionicframework.com/t/ionic-app-takes-too-long-to-start/97546

Change of format for whodunnit between Rails 4.1 and Rails 4.2

I'm in the process of upgrading our app from Rails 4.1 to Rails 4.2 and I'm running into an issue with the whodunnit field.
In Rails 4.1 the whodunnit field ends up as a YAML string, while under Rails 4.2, it is a text representation of a hash. I'm using PaperTrail 5.1.1.
Rails 4.1
[1] pry(#<RSpec::ExampleGroups::xxx::xx>x)> assigns(:session).versions.last.whodunnit
=> "---\n:admin_id: 5\n"
Rails 4.2
[4] pry(#<RSpec::ExampleGroups::xxx::xxx>)> assigns(:session).versions.last.whodunnit
=> "{:admin_id=>1}"
Does anybody have any idea why this change might have happened and if it's consequential.

No application integration exists for rails. Compass and rails 4

I started a rails 4 project and added the following gem (supposedly, it has rails 4 support)
gem 'compass-rails', '~> 2.0.alpha.0'
However, after bundle install and $ bundle exec compass init I keep getting
No application integration exists for rails.
Anyone knows why ?
Thanks,
I get the same error with compass-rails v1.1.3 and rails 4, when running "bundle exec compass init rails", but when I run "bundle exec compass init" (omitting "rails") it works fine for me. The version of compass-rails you are using has been yanked since last July (see here: http://rubygems.org/gems/compass-rails/versions/2.0.alpha.0).
Remove project_type = :rails from your config file.

Rails 4.0 project not starting through aptana studio 3

Currently using the Aptana Studio 3 plugin for eclipse (3.4.2) and I'm unable to start my rails 4.0 project.
Error: Ruby program /xx/xx/xx/xx/HelloRails/script/rails does not exist.
It looks like Aptana is still looking for the rails executable in script, while it moved to bin in rails 4.0. Is there any workaround/fix available for this?
Create a folder script in the root of the app and place rails file from the bin folder to the script folder then it will work.
You might need to change the web-server options in the aptana setting also.
I was having the same problem but this fix fixed it