小编sca*_*now的帖子

使用Ruby on Rails创建链接

显然,我是新手.

我需要使用rails来建立模型内的链接.我的代码就是这个.它甚至可能不是正确的语法:

<li id="nav_home"><%= link_to 'SOMETHING', {:controller => 'inventories', :action => 'home'} %></li>
Run Code Online (Sandbox Code Playgroud)

此代码默认为创建文本链接,但我希望链接元素链接.理想情况下,它会输出如下:

<li><a href="goes-to-something"></a></li>
Run Code Online (Sandbox Code Playgroud)

谢谢!

ruby-on-rails hyperlink

5
推荐指数
1
解决办法
2万
查看次数

不会让我在Ruby提示符下安装Gem

Windows Vista,Ruby v.3.3.5

C:\>gem install rmagick

Building native extensions.  This could take a while...

ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

C:/Ruby19/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include …
Run Code Online (Sandbox Code Playgroud)

ruby windows gem install windows-vista

1
推荐指数
1
解决办法
3537
查看次数

标签 统计

gem ×1

hyperlink ×1

install ×1

ruby ×1

ruby-on-rails ×1

windows ×1

windows-vista ×1