View rendering and javascript files

Hi I am noticing my view rendering is getting a bit bogged down as I
add more javascript libraries. For each .js file I have, I am seeing
this in the console:

Started GET “/assets/tinymce/jscripts/tiny_mce/tiny_mce.js?body=1” for
127.0.0.1 at 2012-02-22 17:44:52 -0500
Served asset /tinymce/jscripts/tiny_mce/tiny_mce.js - 304 Not Modified
(0ms)

While rails is busy figuring out if any of these .js files have
changed, my view goes blank before the next page gets rendered, it’s
noticeable and annoying.

I am testing in development and want to know if this is a side-effect
of the development environment, or is there something I can do to
speed things up?


Kind Regards,
Rajinder Y.

You can see if it’s a consequence of running your server in
development mode by testing your app out in production instead. Issue
the command “rails server -e production” and see what happens!

I need some more help, I’ve never tested in production mode.

However after creating my production db, and running the rails server
is production I get a few errors

  1. WeBrick claims port 3000 is already in use when it’s not, not a big
    deal

=> Booting WEBrick
=> Rails 3.2.1 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-02-25 10:08:21] INFO WEBrick 1.3.1
[2012-02-25 10:08:21] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
[2012-02-25 10:08:21] WARN TCPServer Error: Address already in use -
bind(2)
[2012-02-25 10:08:21] INFO WEBrick::HTTPServer#start: pid=11666
port=2010

  1. When I use port 2010 to view my website I get a directory listing?

Index of /

Name Last modified Size

Parent Directory 2012/02/22 21:11 -
.git/ 2012/02/23 23:25 -
.gitignore 2012/02/23 22:47 509
Gemfile 2012/02/21 19:02 846
Gemfile.lock 2012/02/21 19:02 2913
README.rdoc 2012/02/12 01:33 9208
Rakefile 2012/02/12 01:33 276
app/ 2012/02/12 01:33 -
config.ru 2012/02/12 01:33 161
config/ 2012/02/19 11:21 -
db/ 2012/02/23 22:46 -
doc/ 2012/02/24 09:29 -
lib/ 2012/02/19 21:44 -
log/ 2012/02/25 09:32 -
public/ 2012/02/12 01:34 -
script/ 2012/02/12 01:33 -
test/ 2012/02/12 01:33 -
tmp/ 2012/02/18 09:19 -
vendor/ 2012/02/12 01:33 -

WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
at localhost:2010

How do I get a production environment working in Rails 3

Thanks!

Found the answer in the RailsGuides in the asset pipeline section,
this is a development mode thingy as I assumed.