2

I am newbie to ruby and rails for several months now.I took a class for ruby and rails which allowed me to create a restaurant blog site. Well I recently started revamping the site to make for my friend. So it's merely just changing some things around pictures, wording, etc. When I created the other blog completely I made a register to log in page which they need to create a log in in order to create and post a comment etc. Everything seems to work fine when I run rails s for the local host server but when I go to create a log in for the site to make sure everything is working correctly. It doesn't allow my to create a log in and I keep getting an error in my rails server. See below! I have searched and searched and can't seem to find a solution. The only thing I really changed around was a few pictures and some wording. I didn't mess around with the log in coding, create log in codes etc. Any help would be great in the mean time I will keep searching. Before this I was getting a content-length error so I followed this site http://theresa.multimediatechnology.at/webrick-warnings-in-ruby-1-9-3/. This seemed to fix that issue but now I get the below. Thanks!

 whitey7@whitey7:~/poe$ rails s
 => Booting WEBrick
=> Rails 3.2.3 application starting in development on
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-07-28 08:59:58] INFO  WEBrick 1.3.1
[2012-07-28 08:59:58] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
[2012-07-28 08:59:58] INFO  WEBrick::HTTPServer#start: pid=4690 port=3000


Started GET "/reviews/register" for 127.0.0.1 at 2012-07-28 09:00:04 -0400
Processing by ReviewsController#register as HTML
  Rendered reviews/register.html.erb within layouts/application (5.9ms)
Completed 200 OK in 75ms (Views: 73.8ms | ActiveRecord: 0.0ms)


Started GET "/assets/reviews.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:04 -0400
Served asset /reviews.css - 304 Not Modified (5ms)


Started GET "/assets/scaffolds.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /scaffolds.css - 304 Not Modified (2ms)


Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /jquery.js - 304 Not Modified (3ms)


Started GET "/assets/reviews.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /reviews.js - 304 Not Modified (1ms)


Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /jquery_ujs.js - 304 Not Modified (2ms)


Started GET "/assets/images/images.jpeg" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /images/images.jpeg - 304 Not Modified (9ms)


Started GET "/assets/images/wisdom1.jpeg" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /images/wisdom1.jpeg - 304 Not Modified (4ms)


Started GET "/reviews/register" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Processing by ReviewsController#register as HTML
  Rendered reviews/register.html.erb within layouts/application (1.2ms)
Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.0ms)


Started GET "/assets/reviews.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /reviews.css - 304 Not Modified (1ms)


Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /jquery_ujs.js - 304 Not Modified (1ms)


Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /jquery.js - 304 Not Modified (5ms)


Started GET "/assets/reviews.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /reviews.js - 304 Not Modified (0ms)


Started GET "/assets/scaffolds.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /scaffolds.css - 304 Not Modified (0ms)


Started GET "/assets/images/wisdom1.jpeg" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /images/wisdom1.jpeg - 304 Not Modified (3ms)


Started GET "/assets/images/images.jpeg" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /images/images.jpeg - 304 Not Modified (3ms)
^[[B
iltempo
  • 15,718
  • 8
  • 61
  • 72
Awhitey98
  • 167
  • 1
  • 2
  • 14
  • You can remove the "304 Not Modified" errors in Rails by adding this line to "config/application.rb": `config.assets.logger = false`. More information about the issue can be found at this [Github Rails issue](https://github.com/rails/rails/issues/2639#issuecomment-3545650). – Brent Matzelle Sep 06 '12 at 13:18
  • possible duplicate of [Ruby on Rails: why do i get message for javascript and css after rails s?](http://stackoverflow.com/questions/7722250/ruby-on-rails-why-do-i-get-message-for-javascript-and-css-after-rails-s) – shilovk Sep 08 '14 at 09:41

1 Answers1

5

The HTTP status code does not indicate an error. It simply means that the asset files (images, css, javascript) do not need to be transferred again as the browser already cached the most current version.

see HTTP 3xx status codes

iltempo
  • 15,718
  • 8
  • 61
  • 72
  • Thanks for the info and link! Would this have any effect when I click on the create log in link nothing happens? Not sure exactly why it's not doing anything when I try to create one. – Awhitey98 Jul 29 '12 at 19:56
  • I don't see a request that is being sent in your logs. The only request it contains is `/reviews/register` and the linked assets (images, css, javascripts). Where is the link going to? – iltempo Jul 29 '12 at 20:07
  • I believe it's going to my register.html.erb file. – Awhitey98 Jul 29 '12 at 22:40
  • Register for new account <%= form_tag :action => 'newuser' do %>

    User ID
    <%= text_field_tag :userid %>

    Full Name
    <%= text_field_tag :fullname %>

    Password
    <%= password_field_tag :password %>

    E-mail
    <%= text_field_tag :email %>

    <%= submit_tag "Create Account" %>

    <% end %>
    – Awhitey98 Jul 29 '12 at 22:41
  • And there is an action `newuser` on your controller? If you follow the convertions this action should be called `create`. – iltempo Jul 30 '12 at 13:30
  • under my reviews_controller.rb I have a newuser. see below! – Awhitey98 Jul 30 '12 at 18:20
  • def newuser respond_to do |format| user = User.new user.userid = params[:userid] user.password = params[:password] user.fullname = params[:fullname] user.email = params[:email] if user.save session[:user_id] = user.userid flash[:notice] = 'New User ID was successfully created.' else flash[:notice] = 'Sorry, User ID already exists.' end format.html {redirect_to '/reviews' } end end – Awhitey98 Jul 30 '12 at 18:25