- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在我的 Linux 终端中创建了一个应用程序“my_new_app”,如下所示:
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 $
目录结构是这样的:
./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
所以我遇到了一个问题,我不知道如何在网络浏览器中访问它请告诉我如何在网络浏览器中看到这个应用程序。请快速回答。提前致谢
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>'
最佳答案
根据文档,进入您的项目(具有您列出的文件夹的项目),然后运行:
rails server
或简称 rails
,在您确保已捆绑之后。
您可以查看文档 here 。然后,您可以在浏览器中的 localhost:3000
中看到它,就像任何其他 ruby Web 应用程序一样(只要您不在 rails server
命令上使用 -b
或 -p
。如果这样做,则必须相应地更改此 url)。
编辑:
根据您的更新,您需要一个 javascript 运行时。您可以使用 therubyracer
来实现此目的,因为大多数情况下它默认包含在 Rails 项目的 Gemfile
中。您应该检查 Gemfile
中是否有 gem "therubyracer"
,如果它被注释掉,请取消注释并重新捆绑,然后再次尝试 rails
。
关于ruby - 在Linux机器上通过 "refinerycms"创建的Web浏览器访问应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20138393/
我认为编辑器中的构建并不是那么好,我考虑将其更改为不同的东西。 是否有任何可用的丰富 javascript 编辑器的完整解决方案?基本上,用其他东西替换编辑器应该相当容易,因为它只生成 html。可能
我今晚安装了 ruby refinerycms gem,试图在普通的 WordPress 或 Drupal CMS 之外使用一个新系统。 我运行了 sudo gem install refiner
我需要为 refinerycms 项目添加一个自定义路径,我是这样做的: mount Refinery::Core::Engine, :at => '/' get 'news/more' => 're
我想删除 RefineryCMS 中每个页面上的 side_body 部分。 指南建议您可以change page parts通过进入 config/initializers/refinery/pag
我有一个带有社区博客引擎的fineryrycms应用程序。我想在blog_post中添加一个图像字段,以便为该帖子选择一个主图像,并将其显示在我的 View 中。 我尝试添加图像字段,没有任何乐趣。然
我是 RefineryCMS 的新手,也是 Rails 的新手。我想做的是在我的布局文件中使用相同的页眉和页脚,然后在从 CMS 数据库中提取的动态部分中,每页使用不同的标记。 示例模板: ...
我是 RefineryCMS 的新手,也是 Rails 的新手。我想做的是在我的布局文件中使用相同的页眉和页脚,然后在从 CMS 数据库中提取的动态部分中,每页使用不同的标记。 示例模板: ...
我刚刚开始使用 ruby on rails 正常工作了一个星期,现在我开始使用 RefineryCMS,我按照官方指南创建了一个演示应用程序,对界面和 CMS 本身有了一点了解,现在我正在尝试使用
我在我的 Linux 终端中创建了一个应用程序“my_new_app”,如下所示: u107@mint107 ~ $ refinerycms /home/u107/my_new_app c
我以前从未使用过 CMS,所以这对我来说是全新的,我需要一些建议。这是用于 RefineryCMS 的。 我需要创建一个仅限管理员的页面,允许管理员用户在后台运行 ruby 代码,即 gem 或自
我知道很多 Ruby 用户都在使用 Jekyll,但我想知道 Jekyll 会比 RefineryCMS 带来什么好处? 有人能强调一下两者的区别和优缺点吗。 最佳答案 我是 Refinery CMS
我看过http://railscasts.com/episodes/196-nested-model-form-revised并尝试用我的精炼引擎做同样的事情,但是在从管理部分添加记录时我无法在我的表
我正在开发一个位于应用程序根目录的精炼CMS 中的自定义 Controller class ExchangeController :controller config.extend ::Ref
我们决定尝试在当前项目中使用 RefineryCMS,但遇到了一些问题。我们在本地开发环境中开始该项目。截止日期很快就到了。起初,我们尝试使用 DreamHost 服务器将项目投入生产。图像存在问题(
Rails 和 RefineryCMS 的新功能。我遇到了这个 question about per page layouts . 它指向我a very nice guide在本指南中它说 In th
在 Refinery CMS 中,在后端的设置选项卡上不存在。有人遇到同样的问题吗? 在炼油厂 CMS 的演示应用程序中,存在“设置”选项卡。当我使用炼油厂创建新项目时。没有标签“设置”。 请告诉我,
我需要将样式添加到 refineryCMS 应用程序内的 img 标签,它首先可以工作,但是当我更改图像时,当然该样式被删除,我们发现 img 标签的默认样式。那么,即使我更改了图像,我如何才能保持这
按照 http://refinerycms.com/guides/getting-started 上的教程进行操作这说到 看起来很简单。所以我用一些测试代码创建了 app/assets/stylesh
我已将 Refinery CMS 升级到最新版本 (2.1.0),其中有一种呈现导航菜单的新方法: (部分_header.html.erb) 相同部分的旧版本: "/refinery/menu",
我正在使用 RefineryCMS 上传博客。一切正常,但是当我将“I18n Translation Default Frontend Locale (Refinery) - en”更改为“es”(西
我是一名优秀的程序员,十分优秀!