Steven Fried

Joined

110 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Setting Up Linux in Windows 11

I just bought a new laptop with Windows Home. Upgraded to Windows Pro.

When I configure the computer for Hyper-V or enable the virtual machine and restart the computer I get a black screen. I can hear the processor working but nothing on the screen. When I restart in Safe Mode and disable virtual machine in the BIOS, everything goes back to normal. I've Googled the issue and there is something about adjusting the UAM or something like that but it's not even an option on this system. Hopefully I'm late to the party on this one and there's a well-known answer.

I'm having the same problem as this user. Based on the logs, I think you're right, the account is not being set. Here is the code from the application_controller.

class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
#before_action :authenticate_user!
before_action :configure_permitted_parameters, if: :devise_controller?
before_action :set_account

def require_account!
  redirect_to root_url(subdomain: 'www') if !@account.present?
end

def set_account
  @account = Account.find_by(subdomain: request.subdomain)
end

def configure_permitted_parameters
  devise_parameter_sanitizer.permit(:sign_up, keys: [:tos,
   account_attributes: [:subdomain]]) 
end

end

How else would I set the account?

Thanks in advance.

Posted in Apartment and Heroku

I am trying to implement Apartment. It works fine in development but the app won't load on production. I get this error:

Apartment::TenantNotFound (One of the following schema(s) is invalid: "ocapp" "public"):

I have researched and tweaked but can't seem to find out what's missing. Any help would be most appreciated.