Full url for an image-path in Rails 3

You can also set CarrierWave’s asset_host configĀ setting like this: # config/initializers/carrierwave.rb CarrierWave.configure do |config| config.storage = :file config.asset_host = ActionController::Base.asset_host end This ^ tells CarrierWave to use your app’s config.action_controller.asset_host setting, which can be defined in one of your config/envrionments/[environment].rb files. See here for more info. Or set it explicitly: config.asset_host=”http://example.com” Restart your app, and … Read more

How do I check for illegal characters in a path?

InvalidPathChars is deprecated. Use GetInvalidPathChars() instead: public static bool FilePathHasInvalidChars(string path) { return (!string.IsNullOrEmpty(path) && path.IndexOfAny(System.IO.Path.GetInvalidPathChars()) >= 0); } Edit: Slightly longer, but handles path vs file invalid chars in one function: // WARNING: Not tested public static bool FilePathHasInvalidChars(string path) { bool ret = false; if(!string.IsNullOrEmpty(path)) { try { // Careful! // Path.GetDirectoryName(“C:\Directory\SubDirectory”) // … Read more

Why is the Powershell Environment PATH different to the System Environment PATH?

The change might be “delayed”, so try one or more of these solutions: Log off and on again; Task Manager > Restart “Windows Explorer” (explorer.exe) Restart your launcher app (launchy, SlickRun, etc) Reboot Explanation: Powershell will inherit the environment of the process that launched it (which depends on how you launch it). This is usually … Read more

Setting the correct PATH for Eclipse

Like Abob said: Eclipse doesn’t consult the JAVA_HOME variable You should specify where Eclipse should find your JDK in the file eclipse.ini. Specifically, the following parameter (note that it is 2 separate lines in the ini file): -vm C:\Java\JDK\1.8\bin\javaw.exe or wherever your javaw.exe happens to be. Note: The format of the ini file is very … Read more