Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example from README #1

Closed
ck3g opened this issue Dec 4, 2012 · 10 comments
Closed

Example from README #1

ck3g opened this issue Dec 4, 2012 · 10 comments
Labels

Comments

@ck3g
Copy link

ck3g commented Dec 4, 2012

Hello.

How can I run example from README page?

That example ain't valid CoffeScript.

"dojox/charting/Chart",

    // Require the theme of our choosing
    "dojox/charting/themes/Claro",
require(["dojox/charting/Chart", "dojox/charting/themes/Claro"], (chart, theme) ->
  # ... Here your code
)

Even if I remove lines till require I've got following errors in JavaScript:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/assets/dojox/charting/Chart.js

Uncaught Error: xhrFailed dojo.js:15

I also trying to create calendar using these examples. And got same errors.

# Gemfile
gem 'rails', '3.2.3'

gem "dojo-rails"
gem "dojox-rails"
// application.js
//= require jquery
//= require jquery_ujs
//= require dojo/dojo
//= require_tree .

require(["dojo/ready", "dojox/calendar/Calendar"],
  function(parser, ready, Calendar){
    ready(function(){
      calendar = new Calendar({
                   dateInterval: "day",
                   style: "position:relative;width:500px;height:500px"
                }, "calendar");
              }
          )}
  );
@robin850
Copy link
Owner

robin850 commented Dec 4, 2012

Hello,

Thanks for reporting this bug. I don't know what is the fuck with the README. I will fix this ; thanks. I will look to fix this bug this week end. It makes me angry because it makes dijit-rails and dojox-rails unusable.

Have a nice day.

@andlaz
Copy link
Contributor

andlaz commented Dec 10, 2012

I think this small typo is breaking the gem, at least it did for me.
#2

thanks,
A

@robin850
Copy link
Owner

@pgn84 : Thanks a lot mate!

@ck3g : Thanks to pgn84, you can now use the example described in the README. The readme has also been fixed in the last commit. The fix is still on the edge version ; I will test this version this week-end and release 0.12.0 if there is no problem.

Thanks a lot for your contribution to this project every one.

@NikoRoberts
Copy link
Contributor

I have been using the edge version and it works well. The rubygems version 0.11.0 doesn't work because of the location of the files. I would like very much to see 0.12.0 pushed.

Nice job putting this gem together, it really has made the inclusion of Dojo very easy in my project

@robin850
Copy link
Owner

@NikoRoberts : dojox-rails 0.12.0 has just been released!

@ck3g : I think we can close this for the moment. Please let me know if you want me to reopen this issue.

Thanks everyone! ❤️

@NikoRoberts
Copy link
Contributor

ty @robin850

I will probably release some of may hacks as examples, although I am sure there are better ways to do the stuff I am doing.

@robin850
Copy link
Owner

@NikoRoberts : Yes, for the moment it's nice. What do you think about a default value of djConfig and a javascript helper to push or override values of this variable ?

@NikoRoberts
Copy link
Contributor

I definitely like the idea of making it the default setting.
I would suggest testing it in your environments and making sure it works.
If it makes sense, I would make it the default and put a recommendation in the Readme to use >Rails 3.1

Should this also be done with the other dojo repos you have?
I noticed they didn't get bumped to a new version.

How would a JavaScript helper work in this situation?
I ask because I have doubts that it would work with all the various different ways you can load the library.

On Dec 16, 2012, at 8:11 AM, Robin Dupret notifications@github.com wrote:

@NikoRoberts : Yes, for the moment it's nice. What do you think about a default value of djConfig and a javascript helper to push or override values of this variable ?


Reply to this email directly or view it on GitHub.

@onezeno
Copy link

onezeno commented May 1, 2013

I have installed dojox-rails 0.14.0 and see a similar 404 message:

GET http://localhost:3000/assets/dojox/grid/DataGrid.js 404 (Not Found)

@robin850
Copy link
Owner

@onezeno : Sorry for the delay. This bug was fixed with c565c24 so just add this to your Gemfile:

gem 'dojox-rails', :github => 'robin850/dojox-rails'

Then bundle and it should work correctly! Thanks for reporting.

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

No branches or pull requests

5 participants