scala-2.8和scalacheck出错:Prop版本错误(Error with scala-2.8 and scalacheck: Prop has wrong version)
scala Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java 1.6.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> import org.scalacheck.Prop.forAll error: error while loading Prop, Scala signature Prop has wrong version expected: 5.0 found: 4.1 in /opt/scala-2.8/lib/scalacheck.jar(org/scalacheck/Prop.class)
它是实际的scala-2.8,并且scalacheck在之前更新了sbaz(sbaz update; sbaz upgrade)。
scalacheck是否正在开发scala-2.8,不适合2.8,或者可能是什么问题?
我是否必须获取源代码,并自行重新编译scalacheck?
scala Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java 1.6.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> import org.scalacheck.Prop.forAll error: error while loading Prop, Scala signature Prop has wrong version expected: 5.0 found: 4.1 in /opt/scala-2.8/lib/scalacheck.jar(org/scalacheck/Prop.class)
It's the the actual scala-2.8, and scalacheck was updated with sbaz immediately before (sbaz update; sbaz upgrade).
Is scalacheck for scala-2.8 under development, and not suitable for 2.8, or what might be the problem?
Do I have to get the sources, and recompile scalacheck by myself?
原文:https://stackoverflow.com/questions/3389162
最满意答案
您可能想尝试:
map.resources :rants, :controller => 'blog_posts' map.resources :users do |users| users.resources :rants, :controller => 'blog_posts' end
这将为您提供您正在寻找的
yoursite.com/users/5/rants/
url,它将生成方便的方法(例如:users_rants_path(@user)
)希望这可以帮助。
You may want to try:
map.resources :rants, :controller => 'blog_posts' map.resources :users do |users| users.resources :rants, :controller => 'blog_posts' end
This will give you the
yoursite.com/users/5/rants/
url that you are looking for and it will generate the handy methods (for example:users_rants_path(@user)
)Hope this helps.
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
创建对象时发生错误,并且正在执行render :new ,它将再次呈现该表单,但将@user作为nil 。 那么<%= form_for [nil, @absence] do |f| %>会发生什么? <%= form_for [nil, @absence] do |f| %>将路径作为不存在的不存在的路径。 因此,无论是在创建操作中获取@user还是在任何地方使用current_user 。 喜欢这个: def new @user = current_user # You may remove t ...
-
在Rails中路由别名(Route alias in Rails)[2019-07-10]
这就是为什么他们在resources上提供了match的path选项: resources :stories, :path => "books" That's why they made the path option on match which is also available on resources: resources :stories, :path => "books" -
在Rails 3中,您可以定义嵌套路由: resources :posts do resources :comments end 我想你可能还需要以不同的方式定义form_for: <%= form_for [:post, @comment] do |f| %> 希望有所帮助! 有关Rails 3中路由的更多信息,请查看http://rizwanreza.com/2009/12/20/revamped-routes-in-rails-3 。 In Rails 3, you can define ne ...
-
找到了。 将此行添加到routes.rb: get '/p/fb' => "product/foobar#show" Found it. Add this line to routes.rb: get '/p/fb' => "product/foobar#show"
-
尝试: <% form_for @new_room, :url => manage_rooms_path(@place) do |f| %> 或者可能会这样工作: <% form_for manage_rooms_path(@place, @new_room) do |f| %> @new_room是Room模型的新实例,因此在控制器中添加: @new_room = Room.new Try: <% form_for @new_room, :url => manage_rooms_path(@pl ...
-
Rails link_to多态父级,可以有一个嵌套路由(Rails link_to polymorphic parent, which can have a nested route)[2024-02-27]
你可以使用一些多变的路由魔法。 module CommentsHelper def path_to_commentable(commentable) resources = [commentable] resources.unshift(commentable.parent) if commentable.respond_to?(:parent) polymorpic_path(resources) end def link_to_commentable(commen ... -
在route.rb文件中尝试以下路由: # routes.rb Rails.application.routes.draw do namespace :stubs do #use namespace instead of scope namespace :api do resources :enpoints end end resources :auth match :api, to: 'api#index', via: :all match :stub ...
-
您可能想尝试: map.resources :rants, :controller => 'blog_posts' map.resources :users do |users| users.resources :rants, :controller => 'blog_posts' end 这将为您提供您正在寻找的yoursite.com/users/5/rants/ url,它将生成方便的方法(例如: users_rants_path(@user) ) 希望这可以帮助。 You may wa ...
-
我有 map.resources :tv_summaries map.resources :tv_shows 所有这一切都在我的route.rb文件中评论这两行修复了问题。 I had map.resources :tv_summaries map.resources :tv_shows all the all up top in my route.rb file commenting those two line fixed the problem.