Jump to content

The ultimate community for Ruby on Rails developers.


Photo

generating first rails app on rails 3.2.16


  • Please log in to reply
9 replies to this topic

#1 paveytel

paveytel

    Signalman

  • Members
  • 12 posts

Posted 26 December 2013 - 07:51 AM

when generating my first status , that is when i do http://127.0.0.1:3000/statuses i have the following error. PLSSS HELP

ExecJS::RuntimeError in Statuses#index

Showing C:/Users/NEBELYN/ruby1/gopbook/app/views/layouts/application.html.erb where line #6 raised:

(in C:/Users/NEBELYN/ruby1/gopbook/app/assets/javascripts/statuses.js.coffee) Extracted source (around line #6):

3: 4: Gopbook 5: <%= stylesheet_link_tag "application", :media => "all" %> 6: <%= javascript_include_tag "application" %> 7: <%= csrf_meta_tags %> 8: 9: Rails.root: C:/Users/NEBELYN/ruby1/gopbook



#2 Bharat Soni

Bharat Soni

    Dispatcher

  • Members
  • 53 posts
  • LocationAhmedabad

Posted 26 December 2013 - 11:47 AM

Add the following gems in your Gemfile

 

gem 'execjs'
gem 'therubyracer'

 

And then run the command

bundle install

Fun with Ruby on Rails


#3 paveytel

paveytel

    Signalman

  • Members
  • 12 posts

Posted 26 December 2013 - 03:52 PM

hi,thanks, but am new to rails, i dont know where in the gem file file i have to add that,thanks



#4 Vasspilka

Vasspilka

    Signalman

  • Members
  • 14 posts

Posted 26 December 2013 - 03:55 PM

Enywhere :) 



#5 paveytel

paveytel

    Signalman

  • Members
  • 12 posts

Posted 26 December 2013 - 04:33 PM

when i do as u told me and run bundle install, i have this response

 

 

       C:/RailsInstaller/Ruby1.9.3/bi

reating Makefile
he system cannot find the path specif
he system cannot find the path specif
he system cannot find the path specif
:/RailsInstaller/Ruby1.9.3/lib/ruby/g
ilder.rb:58:in `setup_python!': libv8
 to build, but it is currently not av
       from C:/RailsInstaller/Ruby1.9
/ext/libv8/builder.rb:42:in `block in
       from C:/RailsInstaller/Ruby1.9
/ext/libv8/builder.rb:40:in `chdir'
       from C:/RailsInstaller/Ruby1.9
/ext/libv8/builder.rb:40:in `build_li
 
 
and when i try to install libv8 i get this error
 
 
       C:/RailsInstaller/Ruby1.9.3/bi
reating Makefile
he system cannot find the path specif
he system cannot find the path specif
he system cannot find the path specif
:/RailsInstaller/Ruby1.9.3/lib/ruby/g
ilder.rb:58:in `setup_python!': libv8
 to build, but it is currently not av
       from C:/RailsInstaller/Ruby1.9
/ext/libv8/builder.rb:42:in `block in
       from C:/RailsInstaller/Ruby1.9
/ext/libv8/builder.rb:40:in `chdir'
       from C:/RailsInstaller/Ruby1.9
/ext/libv8/builder.rb:40:in `build_li
 
 
 
PLS HELP


#6 Vasspilka

Vasspilka

    Signalman

  • Members
  • 14 posts

Posted 26 December 2013 - 04:55 PM

Have you installed Ruby and Rails Properlly? I am no expert but it seems something is wrong with that.

 

Could you be more specific as to what have you done to be stuck here? I mean how did you install all the dependencies? How did you make your rails app? If you run "ruby -v" in the command line what does it output? Are you following a tutorial or creating something on your own?



#7 paveytel

paveytel

    Signalman

  • Members
  • 12 posts

Posted 26 December 2013 - 05:44 PM

ok i am following a project on treehouse, where they build social networking site like fb. they use the rails 3.2.1. so i go to railsinstaller and install the package for windows. when i initial run rails -v i have rails4.0.2, now i had several problems with this and most people on the forum told me to switch to rails 3.2 which is what the course is using.

 

i did rails railties which gave me the option to uninstall rails4. then i created a dir called fbook, and the following steps to create my first application

cd fbook

rails server, went to the localhost and server was running at http://127.0.0.1:3000

then closed the server,ctrl c

rails generate scaffold status name:string content:text

rake db:migrate

rails server, went to http://127.0.0.1:3000/ which worked, but when i run http://127.0.0.1:3000/statuses i have the error

 

ExecJS::RuntimeError in Statuses#index

Showing C:/Users/NEBELYN/fbook/fbook/app/views/layouts/application.html.erb where line #6 raised:

(in C:/Users/NEBELYN/fbook/fbook/app/assets/javascripts/statuses.js.coffee)

 

Extracted source (around line #6):

3: <head>
4: <title>Fbook</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>

 

 

Rails.root: C:/Users/NEBELYN/fbook/fbook



#8 Vasspilka

Vasspilka

    Signalman

  • Members
  • 14 posts

Posted 26 December 2013 - 09:16 PM

It seems you have a problem with Javascript... I am not at all experienced with this but what does the file in C:/Users/NEBELYN/fbook/fbook/app/assets/javascripts/statuses.js.coffee include? Is it blank? Try deleting it if it is.



#9 paveytel

paveytel

    Signalman

  • Members
  • 12 posts

Posted 26 December 2013 - 09:48 PM

i dont see any statuses.js.coffee ,   in  C:/Users/NEBELYN/fbook/fbook/app/assets/javascripts i find application.js which is below.

 

 

 

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// 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 .


#10 Bharat Soni

Bharat Soni

    Dispatcher

  • Members
  • 53 posts
  • LocationAhmedabad

Posted 27 December 2013 - 02:10 PM

Did you find Gemfile ?

 

it is in the root of you application and please write the errors in code tags so one can help you easly.

 

You have post that error but i can not Understand it. 

 

And please verify that where you get the Error.

 

Waiting for your reply................


Fun with Ruby on Rails





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users