-1

I have Created a app "my_new_app" in my linux terminal like as follow :

u107@mint107 ~ $ refinerycms /home/u107/my_new_app
      create  
      create  README.rdoc
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/assets/images/rails.png
      create  app/assets/javascripts/application.js
      create  app/assets/stylesheets/application.css
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers
      create  app/models
      create  app/views/layouts/application.html.erb
      create  app/mailers/.gitkeep
      create  app/models/.gitkeep
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  lib/assets
      create  lib/assets/.gitkeep
      create  log
      create  log/.gitkeep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/index.html
      create  public/robots.txt
      create  script
      create  script/rails
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/javascripts
      create  vendor/assets/javascripts/.gitkeep
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.gitkeep
      create  vendor/plugins
      create  vendor/plugins/.gitkeep
       apply  /var/lib/gems/1.9.1/gems/refinerycms-2.1.0/templates/refinery/installer.rb
/var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    from /var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:5:in `<module:ExecJS>'
    from /var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:4:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /var/lib/gems/1.9.1/gems/refinerycms-2.1.0/templates/refinery/installer.rb:6:in `apply'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/actions.rb:221:in `instance_eval'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/actions.rb:221:in `apply'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/generators/app_base.rb:109:in `apply_rails_template'
    from (eval):1:in `apply_rails_template'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `block in invoke_all'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `each'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `map'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `invoke_all'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/group.rb:233:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/lib/gems/1.9.1/gems/refinerycms-2.1.0/bin/refinerycms:43:in `<top (required)>'
    from /usr/local/bin/refinerycms:23:in `load'
    from /usr/local/bin/refinerycms:23:in `<main>'
u107@mint107 ~ $ ^C
u107@mint107 ~ $ cd /home/u107/my_new_app/
u107@mint107 ~/my_new_app $ rails server
/var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    from /var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:5:in `<module:ExecJS>'
    from /var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:4:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
    from /var/lib/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /home/u107/my_new_app/config/application.rb:13:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:53:in `require'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:50:in `tap'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
u107@mint107 ~/my_new_app $ 

A dircetory structure is this :

./log
./script
./config
./config/locales
./config/initializers
./config/environments
./lib
./lib/tasks
./lib/assets
./public
./vendor
./vendor/plugins
./vendor/assets
./vendor/assets/stylesheets
./vendor/assets/javascripts
./db
./tmp
./tmp/cache
./tmp/cache/assets
./app
./app/views
./app/views/layouts
./app/helpers
./app/models
./app/assets
./app/assets/images
./app/assets/stylesheets
./app/assets/javascripts
./app/controllers
./app/mailers
./doc

so here i got a problem i don't know how to access it in web browser Please tell me how can i see this app in web browser. Please answer rapidly. Thanks in advance

Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
u107@mint107 ~/my_new_app $ rails server
/var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    from /var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:5:in `<module:ExecJS>'
    from /var/lib/gems/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:4:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
    from /var/lib/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
    from /var/lib/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /home/u107/my_new_app/config/application.rb:13:in `<top (required)>'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:53:in `require'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:50:in `tap'
    from /var/lib/gems/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

1 Answer 1

1

According to the docs, go into your project (the one that has the folders you listed), and run:

rails server or rails s for short, after you make sure you have bundled.

You can see the docs here. You can then see it in your browser at localhost:3000 just like any other ruby web application (as long as you don't use -b or -p on the rails server command. If you do, you must change this url accordingly).

Edit:

According to your update, you need a javascript runtime. You can use therubyracerfor this, as it is included by default in your Gemfile for a rails project most of the time. You should check your Gemfile for gem "therubyracer" and if it is commented out, uncomment it and re-bundle, then try rails s again.

7
  • Sir i have just tried but not worked yet .i have changed question so please see what i got after type rails s Commented Nov 22, 2013 at 7:01
  • where i have to check this ? ok got it its in root folder and like as follows :# gem 'therubyracer', :platforms => :ruby Commented Nov 22, 2013 at 7:11
  • it should be in your project directory, since you can see in the output of the refinerycms: create Gemfile is there.
    – IT Ninja
    Commented Nov 22, 2013 at 7:12
  • here i have to remove # sign only? Commented Nov 22, 2013 at 7:13
  • Ok sir now i make it as gem 'therubyracer', :platforms => :ruby alright and i have to start rails s now ? Commented Nov 22, 2013 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.