boostrap在rails应用程序中,404(找不到) [英] boostrap in a rails application, 404 (Not Found)

查看:187
本文介绍了boostrap在rails应用程序中,404(找不到)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已尝试根据stackoverflow上的 this 程序整合引导程序(我的rails版本是3.2.17,这是一个区别),所以没有gem,但只包括相关项目目录中的引导文件。

然后我创建了一个HTML页面,并把它放在项目的公共目录中。

这是代码:

I've tried to integrate bootstrap following this procedure found on stackoverflow (my rails version is the 3.2.17, this is a difference), so without a gem but just including the bootstrap files in the relevant project directories.
Then i've created an HTML page and i put it in the project public directory.
This is the code:



<!DOCTYPE html>
<html>
<head>
    <title>Bootsrap Test 01</title>
    <link rel="stylesheet" href="css/bootstrap.css">
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
</head>

...

但是当我加载页面并检查它GETs产生以下错误:

But when i load the page and inspect it (it loads) i can see that the GETs produces the errors below:

GET http://localhost:3000/css/bootstrap.css 404 (Not Found) 
GET http://localhost:3000/js/bootstrap.min.js 404 (Not Found) 


推荐答案

路径不是:

css/bootstrap.css

assets/bootstrap.css

这篇关于boostrap在rails应用程序中,404(找不到)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆