While developing a Rails 7 app, what changes in the code base require me to restart the server? - ruby-on-rails-7

I have e file in lib. It appears that if I change that file, I need to stop and restart the server to pick up the changes. In the past, most of the items in the config directory required me to stop and restart the server before they took affect but I've been surprised a few times that things took effect without a restart.
What files do not get automatically reloaded?

By default anything outside of the app directory. See Rails.application.send :_all_autoload_paths and config.autoload_paths for how to add more.

Related

Startup Project keeps reverting to IIS Express for debugging

In my solution I basically have two projects, the one I'm coding on, and the startup project, Startup.csproj. I have Startup.csproj configured to use Local IIS for debugging, and I normally just attach to the worker process to debug.
However, at random intervals, the Startup.csproj defaults back to IIS Express for debugging. It does not show as a change in the Startup.csproj project file, and sometimes even still shows Local IIS but fails with a "Cannot list contents of directory" error.
I'm running VS 2017 v15.9.15. What could be causing this annoying little phenomenon?
I thought I am going crazy. I found the settings driving that behavior in the project file. I set the UseIISExpress to 'false' and the other one all the way at the end of the file project UseIIS to 'true' and when reloading still set to use IISExpress.
Turns out there's a <ProjectFile>.csproj.user that will overwrite default settings. Search for the UseIISExpress in this file and set it to false and Voila! problem solved.
Restart your IIS and try as above
and go to the root directory and delete .vs directory if exists.
or
In the Processes window (Debug -> Windows -> Processes), right-click on the name of the process you want to detach, and on the shortcut menu, click Detach Process.:
Another scenario may be that the port that IIS is using for your application is already being used by another running application. Try changing the port and see if it works for you.

project update doesn’t activate on client side javascript changes

I've just had to reinstall Windows on my computer and in the process reinstall Meteor (the most current version).
I copied across all of the client/server/package files from an archived version of my project and it's running fine for the most part except the project only auto updates when I make changes to html or css files (and it does so very quickly!) When I edit the javascript files it not only doesn't auto update but it ignores my changes even when I manually refresh the page. I have to stop the project and then start it again to see those changes. Also worth noting that server side javascript changes activate an update immediately, this is exclusively on the client side.
Any thoughts? I don't even know where to begin with debugging this

Meteor File Change Watcher is taking too long to recognize changes

My Meteor file change watcher is taking forever to detect my file changes and refresh the browser, sometimes even longer than a minute. This makes developing a real pain.
My Meteor is running inside an Ubuntu-VM. The projects folder lies in my OSX and is mounted inside the VM. So I'm aware that inotify/kqueue won't work, so Meteor should fallback to stat polling.
I even set the environment variables according to this post, but the behavior is still the same.
METEOR_WATCH_FORCE_POLLING=true
METEOR_WATCH_POLLING_INTERVAL_MS=500
Is there any way to fix this annoying behavior?
The folder from OSX is mounted as a nfs share btw.
Update:
I did some testing and there is no difference if the application has a big amount of packages or is taking long to build, even with the very basic app you get after meteor create I still get the same behavior.
If I change a file in the VM (so that inotify works) the refresh is happening instantly.
I've have apps in production that incrementally become slower when adding packages, both 3rd party and private packages. I also discovered that adding 3rd libs directly on the client/lib increases the reloading time.
I'm not sure if Meteor 1.0.2 actually solved the problem of watching the directory efficiently.
What version of Meteor are you using?
Much of this lag-reloading issue was addressed on Meteor 1.0.2. While it still takes some time, I would say was ~5x faster on my experience.

Meteor.js packages download every time on file change

I'm developing a little app with meteor.js
After editing a file loaded by server, it does the server restart before the livereload;
this restart takes a long time, and everytime in the console it says "downloading packages";
I can't understand what it needs to download every time and if there is a way to avoid that
This is a known issue they're working on. You can follow the progress at https://github.com/meteor/meteor/issues/2846

Problem with built assembly not matching source when debugging under IIS 7.5

I have a problem debugging a web forms application that is configured to use IIS for debugging, under Windows 7 and Visual Studio 2010. An example has just occurred, where I make a change to the code behind for a web form, save, and apparently rebuild before starting the app using F5.
The app starts, and I get an error message trying to do something in the app. I tell the debugger to break when an exception is thrown and try my task again, only to be told
The source file is different from when the module was built.
where the module is C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\9d7b45ca\11a98b19\assembly\dl3\5e6cf0b2\636409d4_dfeecb01\PerfixEMS_Admin.DLL
The physical folder for my test web site is set to the web application project's source folder, so I have always assumed that IIS will look in the bin folder for required assemblies, and these will be rebuilt as expected. Why is this not happening?
Cleaning the solution usually works for me.
Update
Given the high number (320) of projects I understand why Clean and Build won't work for you. You should however try it at least once to see if fixes things.
If it does fix your problem but doesn't last you'll need to do one of two things.
Clean just the one file
Delete the offending temp file. You probably won't be able to do this because with VS running since it may have a lock on the DLL. You may also have to stop IIS. You can use Process Explorer to look for the processes that have a lock.
Use a custom solution
Its unlikely that you're going to be modifing all 320 projects at the same time. Create a custom solution for just the projects you're working on. You'll still be able to step through any project you have the DLL and PDB for if you need to.
Which to do
Using a custom solution has its problems since you can no longer use project reference for projects not in your solution. This impacts your team's source control. You'll also have to make sure the DLL's and PDB's from outside your solution are in a stable location and you'll need a way to detect when thoes other projects have changes that you care about.
These problems can be overcome with a careful check-in process for Project changes and scripts that copy files and working with team members to figure out how to communicate changes.
On the other hand closing VS for every change or running Clean and build isn't really tennable either.
it may be a workaround, but I just need to see if it will work or not, then we may investigate more in the original case. but for now, try this:
1- publish this website to a different folder
2- open the newly published version from your preferred browser (ex: http://localhost/APP_NAME).
3- from VS, open "Debug" menu, choose "Attach to process..."
4- select the IIS worker process "w3wp.exe" and click "Attach".
(if you can't find it, make sure that the checkbox "show processes in all sessions" is checked)
5- start debugging your source code normally and let me know what happened, thanks.

Resources