我在运行任何迁移时遇到错误:
raj@notebook-pc:~/Desktop/Projects/invoicemanagement$ rails g migration RemoveDescriptionOfGoodsFromInvoiceDetails description_of_goods:string
Warning: You're using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
/var/lib/gems/1.9.1/gems/bundler-1.9.0/lib/bundler/runtime.rb:34:in `block in setup': You have already activated spring 1.3.3, but your Gemfile requires spring 1.3.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
from /var/lib/gems/1.9.1/gems/bundler-1.9.0/lib/bundler/runtime.rb:19:in `setup'
** 11 stack trace lines skipped **
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
Run Code Online (Sandbox Code Playgroud)
所以通过一些谷歌搜索我运行捆绑更新弹簧,它解决了上述错误,我能够删除/添加迁移.再次,如果我运行rake db:migrate,我收到错误:
rake aborted!
StandardError: An error has …Run Code Online (Sandbox Code Playgroud) 我安装了npm,bower和gulp.但是在运行gulp app:serve时,我收到以下错误.请帮我.这是我运行的命令: sachin @ sachin:〜/ Desktop/workspace/myproj/angular/ex(master)$ gulp app:serve
结果我得到了:
Error: Cannot find module 'require-dir'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/sachin/Desktop/workspace/myproj/angular/ex/gulpfile.js:14:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Run Code Online (Sandbox Code Playgroud) 我在 app/views/reports 下有一个名为 _report_js.html.erb 的 javascript 文件。当我运行我的应用程序时,我收到错误:
类型错误:$.url 不是函数
这是我的代码:
<script type="text/javascript">
if($.url().param('ig') == 'true') {
alert("hi");
$('#icons').hide();
$('#photos').show();
end
</script>
Run Code Online (Sandbox Code Playgroud) 我有一个注册页面,用户将在其中输入个人信息和信用卡信息.此信用卡信息与activemerchant集成,并且此信息存储在数据库中.
这是我的表格:
<%= semantic_form_for(@account, :url => account_create_path, :html => { :multipart => true, :class => 'billing'}) do |f| %>
<div class="section section-first">
<%= f.inputs :for => :user do |u| %>
<h3>Account Information</h3>
<%= u.input :name, :input_html => {:placeholder => "Name", :value => @account.user.name} %>
<%= u.input :email, :input_html => {:placeholder => "Email", :value => @account.user.email} %>
<% end %>
</div>
<div class="section">
<%= f.inputs :for => :creditcard do |c| %>
<h3>Credit Card Information</h3>
<%= c.input :brand, :selected => @creditcard.brand.nil? ? …Run Code Online (Sandbox Code Playgroud)