My jruby rack sinatra compass haml app correctly reloads changes to *.rb files, but does not detect changes to *.haml files.
Is this compass doing some caching or a limitation of Rack::Reloader? Any pointers to how to fix?
Try http://github.com/rkh/sinatra-reloader
Do this in your app:
enable :reload_templates
Otherwise template reloading is only enabled in development mode.
Related
I have updated my module from moodle 3.2 to moodle 3.5 and receive these errors in the debug web console:
moodle-core-event: Global event published: FORM_ERROR
yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:5828 moodle-core-event:
Global event published: BLOCK_CONTENT_UPDATED
These errors show when opening a pop up with atto editor so notes can be saved. Unfortunately, I can't save the notes and it seems the above errors are causing the issue.
I have tracked down a similar error on the moodle forum site:
https://moodle.org/mod/forum/discuss.php?d=367647
However, no solution has been marked. Sadly no apache errors are showing so I can't narrow down the problem.
Can someone shed some light on these errors?
Just checking the obvious, but did you purge the caches? Javascript is cached
Administration > Site administration > Development > Purge all caches
or
php admin/cli/purge_caches.php
I always turn the cache off in config.php in a development environment $CFG->cachejs = false; but never on production, which has caught me out before.
Also, you might need to run grunt to minify the javascript files, then add the minified files to the git repository
https://docs.moodle.org/dev/Grunt
If your javascript is in a folder called amd
grunt amd
If your javascript is in a folder called yui/src/something
grunt shifter
Or just
grunt js
I was fixing things on a not well-maintained typo3 installation and it resulted in blank pages of frontend, backend and install tool.
I wanted to fix extensions because the powermail-extension was not working anymore even after updating to latest compatible version (tried emptying cache and database compare).
I deactivated an extension "compatibility6" to see if it was interfering and since then all pages have been blank including Install Manager. I reactivated the extension via PackageStates.php, emptied the cache but it did not change anything. I was not able to see any error messages even though I set the parameter in LocalConfiguration.php which made it hard to try to find out what is wrong. Then I restored a backup using vmware. Still, backend and frontend are blank.
I am using Apache and Typo3 7.6.23.
I do not know what might be causing the problem and would like to know what else to look for?
It means you have a PHP error there. The first thing would be to examine logs. If you see anything like "class not found", then your next action would be composer dumpautoload --no-dev.
Long time ago I had an article about blank pages in TYPO3 FE. Not up to date but still can be helpful: https://www.dmitry-dulepov.com/2009/03/blank-empty-page-in-typo3.html
Dmitry already wrote it: you have an error.
In production environment nothing is shown for not revealing any information about your system.
So the only information about the error can be found in the error log of your webserver.
What can you do to get more information about your error?
Enter the install tool and switch to develop mode. This will also enable deprecation logging into a file. Try to avoid filling your system with deprecation warnings by disabling deprecation logging.
Disable the default exceptionhandler by adding this to your typoscript setup:
config.contentObjectExceptionHandler = 0
Now you should see a call stack instead of blank screens.
Be aware that this might reveal confidential information from your system.
because of this you should use a copy of the live-system.
New to Sinatra, just development server up and running but rackup is using WEBrick instead of Thin, Thin gem is already installed, this has to be a simple configuration tweak but I don't know where. Oh while you are at it, does Thin auto-refresh when I change the source code? It appears that I have to stop and restart WEBrick when I make source code changes.
EDIT
As suggested, thin start works with a tweak for my setup. By itself, it throws an error "start_tcp_server": no acceptor (RuntimeError) which means I already have another service running on that port. To resolve the issue, I simply run thin start -p 9292. Hope this helps someone else.
I believe you'll likely just want to start up thin via something like:
bundle exec rackup -s thin
If you're on OSX you might want to check out Pow for your development environment.
For reloading files between requests: How to get Sinatra to auto-reload the file after each change?
You can start the server with Thin using just $ thin start.
If you want code reloading, use one of the several reloading libraries in the wild: Shotgun (which will fork and exit for every request, does not work on Windows), Rack Reloader (which is a Rack middleware) or Sinatra Reloader. I personally favor Sinatra Reloader, since it just reloads files that have changed and is therefore faster. Also there's the possibility to add additional files which shall be reloaded and files that must not be reloaded.
So i have created an app using the MVVM pattern. I'm ready to give this to a couple friends to test out for me. So i make a folder and copy over my files
- MyApp.exe
- MyApp.ViewModel.dll
- MyApp.Model.dll
- MyApp.Common.dll
- config.xml
I sent it out and now its time to fix bugs and add features. The only files that changed were
- MyApp.exe
- MyApp.ViewModel.dll
- MyApp.Model.dll
What is the best way to deploy these changes? I can see people just copying over the exe file and the program may run if the changes to the model or viewmodel were not huge.. I could also see this becoming a nightmare to figure out if if everyone is using the correct dll files. What is best practice for this?
You can try to use ClickOnce to deploy the app to a regular http server. Once you make changes they'll be updated with the latest version of your app. It's pretty easy.
http://johnnycoder.com/blog/2009/02/18/clickonce-getting-started-sample/
Randolf's suggestion is indeed the best option.
however, if you don't have access to an http server, you might want to use versioning to differentiate between releases.
that way you and your testers can easily see what version they're using (you can even display the assembly version info in the UI for convenience).
I have a small Sinatra app I'm running on a shared hosting account using Passenger. However, the first time the app is accessed after a while, I get a Passenger error page saying the application could not be started. Usually because Sinatra could not be found.
I am assuming this is just a normal delay from when a new instance is spawned. However, is there a way to delay trying to load Siantra until it Passenger has fully loaded?
I seem to have solved the issue by setting the GEMS_PATH environment variable in the .htaccess file. I haven't encountered the error again. YET!
I took this up with Dreamhost support recently (not a great experience) and eventually they recommended freezing the gems into the application. This is at best a partial solution, because it seems to work for some gems and not for others.
Instead of
require 'sinatra'
I have:
require 'vendor/gems/sinatra-0.9.4/lib/sinatra'
Freezing gems is covered elsewhere, but briefly: to prepare for this, one needs to do
mkdir vendor/gems
cd vendor/gems
gem unpack sinatra
As a result of this change, I never get the startup failure screen quoting sinatra as the file it can't load. However, I still get it for some other gems which require themselves or parts of other gems. Not too clear about the details, but I'm working on the idea of hacking the installed gems to make every "require" use a path directly out of my "vendor" library.
I think you may need to add Gem.clear_paths! in there
I had a similar problem a long time ago. Updating to a newer Sinatra gem helped me - what version are you running?