Rails 3.2.3 not including javascript

Howdy,

Using rails 3.2.3 and ruby 2.0.0dev. Running rails s, doesn’t seem to
include the javascript. This causes Delete/destroy to never work. It
just
defaults to a GET and thus show.

I tested this in a barebones project

rails new testingjs
–uncomment ruby race in gemfile
bundle install
rails g scaffoled testingmodel value:integer
rake db:migrate
rails s

voila a rails app in which you can’t delete anything, all from
autogenerated code. How would I go about fixing this so I can actually
use
css/js? I figure theres a file somewhere thats borked.

Also I don’t know much about rails “asset pipeline” but the JS/CSS files
being served look like this

// This is a manifest file that’ll be compiled into application.js,
which

// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT’S TO BE PROCESSED,
ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
;

Which seems wrong to me, I don’t think the client/browser should be
seeing
that file.

On 10 May 2012 14:26, Beau [email protected] wrote:

bundle install
rails g scaffoled testingmodel value:integer
rake db:migrate
rails s

Hi, I’ve just followed those instructions with Rails 3.2.3 and Ruby
1.9.3p0
and everything works fine. So, it’s either a ruby 2 issue, or something
else in your configuration. I suspect it’s the later.

Do you get the same results if you run:
bundle exec rails s
?

Beau wrote in post #1060314:

Howdy,

Using rails 3.2.3 and ruby 2.0.0dev. Running rails s, doesn’t seem to
include the javascript. This causes Delete/destroy to never work. It
just
defaults to a GET and thus show.

I tested this in a barebones project

AFAIK Rails 3.2.3 is not supported on Ruby 2.0 so I’m not surprised at
all that you’re having problems. Install the latest patch of Ruby 1.9.3
and all should be well.

Also I don’t know much about rails “asset pipeline” but the JS/CSS files
being served look like this

// This is a manifest file that’ll be compiled into application.js,
which

// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT’S TO BE PROCESSED,
ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
;

Which seems wrong to me, I don’t think the client/browser should be
seeing
that file.

Sounds to me like it’s time for you to get to know something about the
Rails asset pipeline before incorrectly assuming something is wrong.

Have you even looked at the Rails guides:

If not that would be a really good place for you to start.

Watch this railscast:

On 10 May 2012 15:11, beau trepp [email protected] wrote:

I’ll try installing an older version of ruby then. Seems odd, I use RVM, and
I generally aim for stable so wasn’t expecting that to happen.

I don’t quite understand what you are saying here. Do you mean that
you believe Ruby 2 is current stable release? 1.9.3 is current
stable I think. See Download Ruby

Colin

I’ll try installing an older version of ruby then. Seems odd, I use RVM,
and I generally aim for stable so wasn’t expecting that to happen.

I admitted I don’t know the intricacies of Rails asset pipeling. Still I
know enough about javascript to identify that being the only JS file
included (or script anywhere on the page), and that containing nothing
to
run. :S

Colin L. wrote in post #1060321:

On 10 May 2012 15:11, beau trepp [email protected] wrote:

I’ll try installing an older version of ruby then. Seems odd, I use RVM, and
I generally aim for stable so wasn’t expecting that to happen.

I don’t quite understand what you are saying here. Do you mean that
you believe Ruby 2 is current stable release? 1.9.3 is current
stable I think. See Download Ruby

Yep, That’s why Ruby 2.0.0dev has that "dev’ tagged to the end of it.
Think of “dev” builds as, “This is not ready for use anywhere.” It’s
just for developers, and contributors to the Ruby language, to try
things out and find out what breaks.

So thanks to the OP. Now we know at least one thing that breaks with the
“dev” release of Ruby. I’m sure there are many, many more things that
are broken.

On 10 May 2012 16:20, Colin L. [email protected] wrote:

On 10 May 2012 15:11, beau trepp [email protected] wrote:

I’ll try installing an older version of ruby then. Seems odd, I use RVM, and
I generally aim for stable so wasn’t expecting that to happen.

I don’t quite understand what you are saying here. Do you mean that
you believe Ruby 2 is current stable release? 1.9.3 is current
stable I think. See Download Ruby

yes, 1.9.3 and javascript works well.