Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Js console errors when using in Rails 3.2.16 #8

Open
spilliton opened this issue Jan 27, 2014 · 1 comment
Open

Js console errors when using in Rails 3.2.16 #8

spilliton opened this issue Jan 27, 2014 · 1 comment

Comments

@spilliton
Copy link

Hello,

I'm attempting to use this gem for the first time. I added the line to my gemfile and did bundle install. I then added

//= require aloha

in my application.js file after my require of jquery and added the link to the stylesheets in my layout. This causes the following scripts to be loaded on the page:

<script src="/assets/aloha/preinit.js?body=1" type="text/javascript"></script>
<script src="/assets/aloha/lib/require.js?body=1" type="text/javascript"></script>
<script src="/assets/aloha/lib/aloha.js?body=1" type="text/javascript"></script>
<script src="/assets/aloha.js?body=1" type="text/javascript"></script>

The preinit attempts:

window.Aloha.settings.baseUrl = '/assets/aloha/lib/';

but throws: Cannot read property 'settings' of undefined

aloha.js itself then throws:

Uncaught TypeError: Object function (module, callback) {
return _require("", module, callback);
} has no method 'config'

any ideas?

@bchagas
Copy link

bchagas commented Aug 27, 2014

Aloha = {};
Aloha.settings = {};

Before call aloha.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants